forked from pool/python-wheel
Accepting request 221654 from devel:languages:python
- Fix update-alternatives usage OBS-URL: https://build.opensuse.org/request/show/221654 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-wheel?expand=0&rev=5
This commit is contained in:
commit
fecf433f25
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Feb 10 14:46:04 UTC 2014 - speilicke@suse.com
|
||||||
|
|
||||||
|
- Fix update-alternatives usage
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Sep 17 08:42:34 UTC 2013 - dmueller@suse.com
|
Tue Sep 17 08:42:34 UTC 2013 - dmueller@suse.com
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-wheel
|
# spec file for package python-wheel
|
||||||
#
|
#
|
||||||
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -27,7 +27,6 @@ Source: https://pypi.python.org/packages/source/w/wheel/wheel-%{version}
|
|||||||
BuildRequires: python-devel
|
BuildRequires: python-devel
|
||||||
BuildRequires: python-setuptools
|
BuildRequires: python-setuptools
|
||||||
# Test requirements:
|
# Test requirements:
|
||||||
BuildRequires: python-argparse
|
|
||||||
BuildRequires: python-cov-core >= 1.6
|
BuildRequires: python-cov-core >= 1.6
|
||||||
BuildRequires: python-coverage
|
BuildRequires: python-coverage
|
||||||
BuildRequires: python-jsonschema
|
BuildRequires: python-jsonschema
|
||||||
@ -40,6 +39,7 @@ Requires(post): update-alternatives
|
|||||||
Requires(postun): update-alternatives
|
Requires(postun): update-alternatives
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
||||||
|
BuildRequires: python-argparse
|
||||||
Requires: python-argparse
|
Requires: python-argparse
|
||||||
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
||||||
%else
|
%else
|
||||||
@ -76,9 +76,11 @@ python setup.py build
|
|||||||
|
|
||||||
%install
|
%install
|
||||||
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||||
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||||
for b in egg2wheel wheel wininst2wheel ; do
|
for b in egg2wheel wheel wininst2wheel ; do
|
||||||
mv %{buildroot}%{_bindir}/$b %{buildroot}%{_bindir}/$b-%{py_ver}
|
mv %{buildroot}%{_bindir}/$b %{buildroot}%{_bindir}/$b-%{py_ver}
|
||||||
ln -s %{_bindir}/$b-%{py_ver} %{buildroot}%{_bindir}/$b
|
touch %{buildroot}%{_sysconfdir}/alternatives/$b
|
||||||
|
ln -sf %{_sysconfdir}/alternatives/$b %{buildroot}/%{_bindir}/$b
|
||||||
done
|
done
|
||||||
|
|
||||||
%check
|
%check
|
||||||
@ -89,7 +91,7 @@ update-alternatives --install %{_bindir}/wheel wheel %{_bindir}/wheel-%{py_ver}
|
|||||||
--slave %{_bindir}/egg2wheel egg2wheel %{_bindir}/egg2wheel-%{py_ver} \
|
--slave %{_bindir}/egg2wheel egg2wheel %{_bindir}/egg2wheel-%{py_ver} \
|
||||||
--slave %{_bindir}/wininst2wheel wininst2wheel %{_bindir}/wininst2wheel-%{py_ver}
|
--slave %{_bindir}/wininst2wheel wininst2wheel %{_bindir}/wininst2wheel-%{py_ver}
|
||||||
|
|
||||||
%preun
|
%postun
|
||||||
if [ $1 -eq 0 ] ; then
|
if [ $1 -eq 0 ] ; then
|
||||||
update-alternatives --remove wheel %{_bindir}/wheel-%{py_ver}
|
update-alternatives --remove wheel %{_bindir}/wheel-%{py_ver}
|
||||||
fi
|
fi
|
||||||
@ -97,12 +99,15 @@ fi
|
|||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc CHANGES.txt README.txt LICENSE.txt
|
%doc CHANGES.txt README.txt LICENSE.txt
|
||||||
%ghost %{_bindir}/egg2wheel
|
%{_bindir}/egg2wheel
|
||||||
%{_bindir}/egg2wheel-%{py_ver}
|
%{_bindir}/egg2wheel-%{py_ver}
|
||||||
%ghost %{_bindir}/wheel
|
%{_bindir}/wheel
|
||||||
%{_bindir}/wheel-%{py_ver}
|
%{_bindir}/wheel-%{py_ver}
|
||||||
%ghost %{_bindir}/wininst2wheel
|
%{_bindir}/wininst2wheel
|
||||||
%{_bindir}/wininst2wheel-%{py_ver}
|
%{_bindir}/wininst2wheel-%{py_ver}
|
||||||
|
%ghost %{_sysconfdir}/alternatives/wheel
|
||||||
|
%ghost %{_sysconfdir}/alternatives/egg2wheel
|
||||||
|
%ghost %{_sysconfdir}/alternatives/wininst2wheel
|
||||||
%{python_sitelib}/wheel-%{version}-py%{py_ver}.egg-info
|
%{python_sitelib}/wheel-%{version}-py%{py_ver}.egg-info
|
||||||
%{python_sitelib}/wheel/
|
%{python_sitelib}/wheel/
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user