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:
commit
44d64cc642
@ -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
|
Wed Jan 13 09:25:06 UTC 2016 - toddrme2178@gmail.com
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ Requires: python-mccabe >= 0.2.1
|
|||||||
Requires: python-pep8 >= 1.5.7
|
Requires: python-pep8 >= 1.5.7
|
||||||
Requires: python-pyflakes >= 0.8.1
|
Requires: python-pyflakes >= 0.8.1
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(postun): update-alternatives
|
Requires(preun): 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
|
||||||
%{!?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()")}
|
||||||
@ -66,16 +66,14 @@ python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
|||||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||||
mv %{buildroot}%{_bindir}/flake8 %{buildroot}%{_bindir}/flake8-%{py_ver}
|
mv %{buildroot}%{_bindir}/flake8 %{buildroot}%{_bindir}/flake8-%{py_ver}
|
||||||
ln -s -f %{_sysconfdir}/alternatives/flake8 %{buildroot}%{_bindir}/flake8
|
ln -s -f %{_sysconfdir}/alternatives/flake8 %{buildroot}%{_bindir}/flake8
|
||||||
# create a dummy target for /etc/alternatives/flake8
|
|
||||||
touch %{buildroot}%{_sysconfdir}/alternatives/flake8
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
"%_sbindir/update-alternatives" \
|
%_sbindir/update-alternatives \
|
||||||
--install %{_bindir}/flake8 flake8 %{_bindir}/flake8-%{py_ver} 30
|
--install %{_bindir}/flake8 flake8 %{_bindir}/flake8-%{py_ver} 30
|
||||||
|
|
||||||
%postun
|
%preun
|
||||||
if [ $1 -eq 0 ] ; then
|
if [ $1 -eq 0 ] ; then
|
||||||
"%_sbindir/update-alternatives" --remove flake8 %{_bindir}/flake8-%{py_ver}
|
%_sbindir/update-alternatives --remove flake8 %{_bindir}/flake8-%{py_ver}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%check
|
%check
|
||||||
|
Loading…
Reference in New Issue
Block a user