Accepting request 845027 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/845027 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pip?expand=0&rev=50
This commit is contained in:
@@ -1,3 +1,15 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Oct 30 00:18:04 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- Make executables setup compatible with multiple python3 flavors
|
||||||
|
* gh#openSUSE/python-rpm-macros#66
|
||||||
|
* update-alternatives for pip3
|
||||||
|
* use %python_clone and %python_install_alternative for sip and
|
||||||
|
sip3
|
||||||
|
* use original bin/sip%{python_bin_suffix} as is
|
||||||
|
* effect: consistent shebangs and specifiers inside the
|
||||||
|
entry_point scripts
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Oct 11 13:08:15 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
|
Sun Oct 11 13:08:15 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
@@ -96,7 +96,10 @@ done
|
|||||||
%if ! %{with test}
|
%if ! %{with test}
|
||||||
%install
|
%install
|
||||||
%python_install
|
%python_install
|
||||||
%prepare_alternative pip
|
%python_clone -a %{buildroot}%{_bindir}/pip
|
||||||
|
%python_clone -a %{buildroot}%{_bindir}/pip3
|
||||||
|
# if we just cloned to pip3-2.7 delete it
|
||||||
|
rm -f %{buildroot}%{_bindir}/pip3-2*
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@@ -121,25 +124,32 @@ donttest+=" or test_from_link_vcs_without_source_dir"
|
|||||||
# Since /usr/bin/pip became ghosted to be used with update-alternatives, we have to get rid
|
# Since /usr/bin/pip became ghosted to be used with update-alternatives, we have to get rid
|
||||||
# of the old binary resulting from the non-update-alternatives-ified package:
|
# of the old binary resulting from the non-update-alternatives-ified package:
|
||||||
[ -h %{_bindir}/pip ] || rm -f %{_bindir}/pip
|
[ -h %{_bindir}/pip ] || rm -f %{_bindir}/pip
|
||||||
|
[ -h %{_bindir}/pip3 ] || rm -f %{_bindir}/pip3
|
||||||
|
|
||||||
%post
|
%post
|
||||||
# can't use `python_install_alternative` because it's pipX.Y, not pip-X.Y
|
# keep the alternative groups separate. Users could decide to let pip and pip3 point to
|
||||||
PRIO=$(echo %{python_version} | tr -d .)
|
# different flavors
|
||||||
%install_alternative pip %{_bindir}/pip%{python_version} $PRIO
|
%python_install_alternative pip
|
||||||
|
%if "%python_flavor" != "python2"
|
||||||
|
%python_install_alternative pip3
|
||||||
|
%endif
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
%uninstall_alternative pip %{_bindir}/pip%{python_version}
|
%python_uninstall_alternative pip
|
||||||
|
%python_uninstall_alternative pip3
|
||||||
|
|
||||||
%if ! %{with test}
|
%if ! %{with test}
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%license LICENSE.txt
|
%license LICENSE.txt
|
||||||
%doc AUTHORS.txt NEWS.rst README.rst
|
%doc AUTHORS.txt NEWS.rst README.rst
|
||||||
%python3_only %{_bindir}/pip
|
%python_alternative %{_bindir}/pip
|
||||||
%{_bindir}/pip%{python_version}
|
%if "%{python_flavor}" == "python2"
|
||||||
%python2_only %{_bindir}/pip2
|
%{_bindir}/pip2
|
||||||
%python3_only %{_bindir}/pip3
|
%else
|
||||||
%ghost %{_sysconfdir}/alternatives/pip
|
%python_alternative %{_bindir}/pip3
|
||||||
%{python_sitelib}/pip-%{version}-py%{python_version}.egg-info
|
%endif
|
||||||
|
%{_bindir}/pip%{python_bin_suffix}
|
||||||
|
%{python_sitelib}/pip-%{version}*-info
|
||||||
%{python_sitelib}/pip
|
%{python_sitelib}/pip
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user