Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ RPM packages are available in the [openSUSE:Tools](http://download.opensuse.org/

To install from git, do

./setup.py build
./setup.py install
pip3 install build
python3 -m build
pip3 install dist/osc-*.whl

Alternatively, you can directly use `./osc-wrapper.py` from the source directory,
which is easier if you develop on osc.
Expand Down
15 changes: 13 additions & 2 deletions contrib/osc.spec
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,11 @@ BuildRequires: %{sphinx_pkg}
%endif
BuildRequires: %{use_python_pkg}-cryptography
BuildRequires: %{use_python_pkg}-devel >= 3.6
BuildRequires: %{use_python_pkg}-pip
BuildRequires: %{use_python_pkg}-rpm
BuildRequires: %{use_python_pkg}-setuptools
BuildRequires: %{use_python_pkg}-urllib3
BuildRequires: %{use_python_pkg}-wheel
BuildRequires: %{yaml_pkg}
BuildRequires: diffstat
%if %{with fdupes}
Expand Down Expand Up @@ -177,7 +179,11 @@ for a general introduction.
sed -i 's/ruamel\.yaml/PyYAML/g' setup.cfg
%endif

%{use_python} setup.py build
%{use_python} -mpip wheel \
--verbose --progress-bar off --disable-pip-version-check \
--use-pep517 --no-build-isolation \
--no-deps \
--wheel-dir ./build .

# write rpm macros
cat << EOF > macros.osc
Expand Down Expand Up @@ -212,7 +218,12 @@ sphinx-build -b man doc .
%endif

%install
%{use_python} setup.py install -O1 --skip-build --force --root %{buildroot} --prefix %{_prefix}
%{use_python} -mpip install \
--verbose --progress-bar off --disable-pip-version-check \
--root %{buildroot} \
--no-compile \
--ignore-installed --no-deps \
--no-index --find-links ./build osc

# symlink /usr/bin/git-obs to /usr/libexec/git/obs
mkdir -p %{buildroot}%{_libexecdir}/git
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
Loading