forked from pool/python2-setuptools
Accepting request 796056 from devel:languages:python
- Fix using update_alternatives. OBS-URL: https://build.opensuse.org/request/show/796056 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python2-setuptools?expand=0&rev=2
This commit is contained in:
commit
aa6c70d3ac
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Apr 21 11:55:39 UTC 2020 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
- Fix using update_alternatives.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Apr 7 08:39:25 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
Tue Apr 7 08:39:25 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
||||||
|
|
||||||
|
@ -57,23 +57,35 @@ sed -r -i '1s@^#!/.*$@@' setuptools/command/easy_install.py \
|
|||||||
|
|
||||||
%install
|
%install
|
||||||
%python2_install
|
%python2_install
|
||||||
%prepare_alternative easy_install
|
|
||||||
|
# update-alternatives
|
||||||
|
mkdir -p %{buildroot}%{_bindir}
|
||||||
|
mv %{buildroot}%{_bindir}/easy_install{,-%{python_version}}
|
||||||
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives/
|
||||||
|
touch %{buildroot}%{_sysconfdir}/alternatives/easy_install
|
||||||
|
ln -sf %{_sysconfdir}/alternatives/easy_install \
|
||||||
|
%{buildroot}%{_bindir}/easy_install
|
||||||
|
|
||||||
%fdupes %{buildroot}%{python2_sitelib}
|
%fdupes %{buildroot}%{python2_sitelib}
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%python_install_alternative easy_install
|
%{_sbindir}/update-alternatives --install %{_bindir}/easy_install \
|
||||||
|
easy_install %{_bindir}/easy_install-%{python_version} 27
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
%python_uninstall_alternative easy_install
|
if [ ! -f %{_bindir}/easy_install ] ; then
|
||||||
|
%{_sbindir}/update-alternatives --remove easy_install %{_bindir}/easy_install-%{python_version}
|
||||||
|
fi
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc CHANGES.rst README.rst
|
%doc CHANGES.rst README.rst
|
||||||
%python_alternative %{_bindir}/easy_install
|
%{_bindir}/easy_install*
|
||||||
|
%{python2_sitelib}/easy_install*
|
||||||
%{python2_sitelib}/setuptools
|
%{python2_sitelib}/setuptools
|
||||||
%{python2_sitelib}/setuptools-%{version}-py*.egg-info
|
%{python2_sitelib}/setuptools-%{version}-py*.egg-info
|
||||||
%{python2_sitelib}/easy_install.py*
|
|
||||||
%dir %{python2_sitelib}/pkg_resources
|
%dir %{python2_sitelib}/pkg_resources
|
||||||
%{python2_sitelib}/pkg_resources/*
|
%{python2_sitelib}/pkg_resources/*
|
||||||
|
%ghost %_sysconfdir/alternatives/easy_install
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user