Use %pyproject_install
[skip changelog]
This commit is contained in:
parent
77a1a20083
commit
f7056f5f8a
1 changed files with 7 additions and 24 deletions
|
|
@ -69,6 +69,9 @@ Patch: dummy-certifi.patch
|
|||
# this warning is juts moot. Also, the warning breaks CPython test suite.
|
||||
Patch: nowarn-pip._internal.main.patch
|
||||
|
||||
# Remove -s from Python shebang - ensure that packages installed with pip
|
||||
# to user locations are seen by pip itself
|
||||
%undefine _py3_shebang_s
|
||||
|
||||
%description
|
||||
pip is a package management system used to install and manage software packages
|
||||
|
|
@ -235,22 +238,9 @@ rm -rf docs/build/html/{.doctrees,.buildinfo}
|
|||
|
||||
|
||||
%install
|
||||
# The following is similar to %%pyproject_install, but we don't have
|
||||
# /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} %{_pyproject_wheeldir}/%{python_wheel_name}/pip install \
|
||||
--root %{buildroot} \
|
||||
--no-deps \
|
||||
--disable-pip-version-check \
|
||||
--progress-bar off \
|
||||
--verbose \
|
||||
--ignore-installed \
|
||||
--no-warn-script-location \
|
||||
--no-index \
|
||||
--no-cache-dir \
|
||||
--find-links %{_pyproject_wheeldir} \
|
||||
'pip==%{upstream_version}'
|
||||
export PYTHONPATH=./src/
|
||||
%pyproject_install
|
||||
%pyproject_save_files -l pip
|
||||
|
||||
%if %{with doc}
|
||||
pushd docs/build/man
|
||||
|
|
@ -280,11 +270,6 @@ ln -s ./pip%{python3_version} %{buildroot}%{_bindir}/pip-%{python3_version}
|
|||
ln -s ./pip-%{python3_version} %{buildroot}%{_bindir}/pip-3
|
||||
|
||||
|
||||
# Make sure the INSTALLER is not pip and remove RECORD
|
||||
# %%pyproject macros do this for all packages
|
||||
echo rpm > %{buildroot}%{python3_sitelib}/pip-%{upstream_version}.dist-info/INSTALLER
|
||||
rm %{buildroot}%{python3_sitelib}/pip-%{upstream_version}.dist-info/RECORD
|
||||
|
||||
mkdir -p %{buildroot}%{python_wheel_dir}
|
||||
install -p %{_pyproject_wheeldir}/%{python_wheel_name} -t %{buildroot}%{python_wheel_dir}
|
||||
|
||||
|
|
@ -314,9 +299,8 @@ pytest_k='not completion'
|
|||
%endif
|
||||
|
||||
|
||||
%files -n python%{python3_pkgversion}-%{srcname}
|
||||
%files -n python%{python3_pkgversion}-%{srcname} -f %{pyproject_files}
|
||||
%doc README.rst
|
||||
%license %{python3_sitelib}/pip-%{upstream_version}.dist-info/LICENSE.txt
|
||||
%if %{with doc}
|
||||
%{_mandir}/man1/pip.*
|
||||
%{_mandir}/man1/pip-*.*
|
||||
|
|
@ -328,7 +312,6 @@ pytest_k='not completion'
|
|||
%{_bindir}/pip-3
|
||||
%{_bindir}/pip%{python3_version}
|
||||
%{_bindir}/pip-%{python3_version}
|
||||
%{python3_sitelib}/pip*
|
||||
%dir %{bash_completions_dir}
|
||||
%{bash_completions_dir}/pip3
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue