Add --no-index --no-warn-script-location pip options to %pyX_install_wheel

--no-index saves a ~1 minute timeout of pip possibly checking if there is
a newer pip version (in mock with disabled network).

--no-warn-script-location removes a bogus warning that says:

    WARNING: The scripts easy_install and easy_install-3.9 are installed in
    '/builddir/build/BUILDROOT/python-setuptools-49.2.0-1.fc33.x86_64/usr/bin'
    which is not on PATH.
    Consider adding this directory to PATH or, if you prefer to suppress this warning,
    use --no-warn-script-location.
This commit is contained in:
Miro Hrončok 2020-07-20 17:36:12 +02:00
parent 0086612c98
commit 06ee391993
4 changed files with 4 additions and 3 deletions

View File

@ -42,7 +42,7 @@
}
%py_install_wheel() %{expand:\\\
%{__python} -m pip install -I dist/%{1} --root %{buildroot} --no-deps
%{__python} -m pip install -I dist/%{1} --root %{buildroot} --no-deps --no-index --no-warn-script-location
rm -rfv %{buildroot}%{_bindir}/__pycache__
for distinfo in %{buildroot}%{python_sitelib}/*.dist-info %{buildroot}%{python_sitearch}/*.dist-info; do
if [ -f ${distinfo}/direct_url.json ]; then

View File

@ -47,7 +47,7 @@
}
%py2_install_wheel() %{expand:\\\
%{__python2} -m pip install -I dist/%{1} --root %{buildroot} --no-deps
%{__python2} -m pip install -I dist/%{1} --root %{buildroot} --no-deps --no-index --no-warn-script-location
rm -rfv %{buildroot}%{_bindir}/__pycache__
for distinfo in %{buildroot}%{python2_sitelib}/*.dist-info %{buildroot}%{python2_sitearch}/*.dist-info; do
if [ -f ${distinfo}/direct_url.json ]; then

View File

@ -40,7 +40,7 @@
}
%py3_install_wheel() %{expand:\\\
%{__python3} -m pip install -I dist/%{1} --root %{buildroot} --no-deps
%{__python3} -m pip install -I dist/%{1} --root %{buildroot} --no-deps --no-index --no-warn-script-location
rm -rfv %{buildroot}%{_bindir}/__pycache__
for distinfo in %{buildroot}%{python3_sitelib}/*.dist-info %{buildroot}%{python3_sitearch}/*.dist-info; do
if [ -f ${distinfo}/direct_url.json ]; then

View File

@ -112,6 +112,7 @@ install -m 644 compileall2.py %{buildroot}%{_rpmconfigdir}/redhat/
- https://fedoraproject.org/wiki/Changes/PythonMacroError
- Make %%python macros more consistent with %%python3 macros
- Define %%python_platform (as a Python version agnostic option to %%python3_platform)
- Add --no-index --no-warn-script-location pip options to %%pyX_install_wheel
* Wed Jul 08 2020 Miro Hrončok <mhroncok@redhat.com> - 3.9-5
- Introduce %%python_extras_subpkg