Accepting request 419444 from devel:languages:python
1 OBS-URL: https://build.opensuse.org/request/show/419444 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pyflakes?expand=0&rev=18
This commit is contained in:
commit
b6bc3deec6
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 15 14:51:56 UTC 2016 - toddrme2178@gmail.com
|
||||
|
||||
- Fix update-alternatives implementation.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 13 09:57:59 UTC 2016 - toddrme2178@gmail.com
|
||||
|
||||
|
@ -30,7 +30,7 @@ BuildRequires: python-setuptools
|
||||
# the pkg_resources module is required at runtime
|
||||
Requires: python-setuptools
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
Requires(preun): update-alternatives
|
||||
%if 0%{?suse_version} <= 1110
|
||||
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
||||
%else
|
||||
@ -55,16 +55,14 @@ python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||
mv %{buildroot}%{_bindir}/pyflakes %{buildroot}%{_bindir}/pyflakes-%{py_ver}
|
||||
ln -s -f %{_sysconfdir}/alternatives/pyflakes %{buildroot}%{_bindir}/pyflakes
|
||||
# create a dummy target for /etc/alternatives/pyflakes
|
||||
touch %{buildroot}%{_sysconfdir}/alternatives/pyflakes
|
||||
|
||||
%post
|
||||
"%_sbindir/update-alternatives" \
|
||||
%_sbindir/update-alternatives \
|
||||
--install %{_bindir}/pyflakes pyflakes %{_bindir}/pyflakes-%{py_ver} 30
|
||||
|
||||
%postun
|
||||
%preun
|
||||
if [ $1 -eq 0 ] ; then
|
||||
"%_sbindir/update-alternatives" --remove pyflakes %{_bindir}/pyflakes-%{py_ver}
|
||||
%_sbindir/update-alternatives --remove pyflakes %{_bindir}/pyflakes-%{py_ver}
|
||||
fi
|
||||
|
||||
%files
|
||||
|
Loading…
Reference in New Issue
Block a user