1
0
forked from pool/python-flake8

Accepting request 419447 from devel:languages:python

1

OBS-URL: https://build.opensuse.org/request/show/419447
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-flake8?expand=0&rev=13
This commit is contained in:
Dominique Leuenberger 2016-08-22 11:59:10 +00:00 committed by Git OBS Bridge
commit 44d64cc642
2 changed files with 9 additions and 6 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Aug 15 14:51:56 UTC 2016 - toddrme2178@gmail.com
- Fix update-alternatives implementation.
-------------------------------------------------------------------
Wed Jan 13 09:25:06 UTC 2016 - toddrme2178@gmail.com

View File

@ -36,7 +36,7 @@ Requires: python-mccabe >= 0.2.1
Requires: python-pep8 >= 1.5.7
Requires: python-pyflakes >= 0.8.1
Requires(post): update-alternatives
Requires(postun): update-alternatives
Requires(preun): update-alternatives
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
@ -66,16 +66,14 @@ python setup.py install --prefix=%{_prefix} --root=%{buildroot}
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
mv %{buildroot}%{_bindir}/flake8 %{buildroot}%{_bindir}/flake8-%{py_ver}
ln -s -f %{_sysconfdir}/alternatives/flake8 %{buildroot}%{_bindir}/flake8
# create a dummy target for /etc/alternatives/flake8
touch %{buildroot}%{_sysconfdir}/alternatives/flake8
%post
"%_sbindir/update-alternatives" \
%_sbindir/update-alternatives \
--install %{_bindir}/flake8 flake8 %{_bindir}/flake8-%{py_ver} 30
%postun
%preun
if [ $1 -eq 0 ] ; then
"%_sbindir/update-alternatives" --remove flake8 %{_bindir}/flake8-%{py_ver}
%_sbindir/update-alternatives --remove flake8 %{_bindir}/flake8-%{py_ver}
fi
%check