Stop invoking setup.py during the build
This is a preparation for pip 24.1 which drops setup.py entirely. [skip changelog]
This commit is contained in:
parent
531939a7ca
commit
05483f6f20
1 changed files with 6 additions and 5 deletions
|
|
@ -153,6 +153,7 @@ BuildRequires: python%{python3_pkgversion}-devel
|
|||
# Note that the package prefix is always python3-, even if we build for 3.X
|
||||
# The minimal version is for bundled provides verification script
|
||||
BuildRequires: python3-rpm-generators >= 11-8
|
||||
BuildRequires: pyproject-rpm-macros
|
||||
BuildRequires: python%{python3_pkgversion}-setuptools
|
||||
BuildRequires: python%{python3_pkgversion}-wheel
|
||||
BuildRequires: bash-completion
|
||||
|
|
@ -242,10 +243,10 @@ sed -Ei '/pytest-(cov|xdist|rerunfailures)/d' tests/requirements.txt
|
|||
|
||||
|
||||
%build
|
||||
%py3_build_wheel
|
||||
export PYTHONPATH=./src/
|
||||
%pyproject_wheel
|
||||
|
||||
%if %{with doc}
|
||||
export PYTHONPATH=./src/
|
||||
# from tox.ini
|
||||
sphinx-build-3 -b html docs/html docs/build/html
|
||||
sphinx-build-3 -b man docs/man docs/build/man -c docs/html
|
||||
|
|
@ -258,7 +259,7 @@ rm -rf docs/build/html/{.doctrees,.buildinfo}
|
|||
# /usr/bin/pip yet, so we install using the wheel directly.
|
||||
# (This is not standard wheel usage, but the pip wheel supports it -- see
|
||||
# pip/__main__.py)
|
||||
%{python3} dist/%{python_wheel_name}/pip install \
|
||||
%{python3} %{_pyproject_wheeldir}/%{python_wheel_name}/pip install \
|
||||
--root %{buildroot} \
|
||||
--no-deps \
|
||||
--disable-pip-version-check \
|
||||
|
|
@ -268,7 +269,7 @@ rm -rf docs/build/html/{.doctrees,.buildinfo}
|
|||
--no-warn-script-location \
|
||||
--no-index \
|
||||
--no-cache-dir \
|
||||
--find-links dist \
|
||||
--find-links %{_pyproject_wheeldir} \
|
||||
'pip==%{upstream_version}'
|
||||
|
||||
%if %{with doc}
|
||||
|
|
@ -305,7 +306,7 @@ echo rpm > %{buildroot}%{python3_sitelib}/pip-%{upstream_version}.dist-info/INST
|
|||
rm %{buildroot}%{python3_sitelib}/pip-%{upstream_version}.dist-info/RECORD
|
||||
|
||||
mkdir -p %{buildroot}%{python_wheel_dir}
|
||||
install -p dist/%{python_wheel_name} -t %{buildroot}%{python_wheel_dir}
|
||||
install -p %{_pyproject_wheeldir}/%{python_wheel_name} -t %{buildroot}%{python_wheel_dir}
|
||||
|
||||
|
||||
%check
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue