forked from pool/python-virtualenvwrapper
Accepting request 419500 from home:TheBlackCat:branches:devel:languages:python
Fix update-alternatives implementation. OBS-URL: https://build.opensuse.org/request/show/419500 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-virtualenvwrapper?expand=0&rev=55
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 15 14:51:56 UTC 2016 - toddrme2178@gmail.com
|
||||
|
||||
- Fix update-alternatives implementation.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 9 18:29:59 UTC 2016 - toddrme2178@gmail.com
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ Requires: python-stevedore
|
||||
Requires: python-virtualenv
|
||||
Requires: python-virtualenv-clone
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
Requires(preun): update-alternatives
|
||||
%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()")}
|
||||
%else
|
||||
@@ -62,6 +62,7 @@ conflicts in their dependencies.
|
||||
%prep
|
||||
%setup -q -n virtualenvwrapper-%{version}
|
||||
%patch -p1
|
||||
sed -i -e '1i#!/bin/sh' virtualenvwrapper.sh
|
||||
|
||||
%build
|
||||
python setup.py build
|
||||
@@ -77,18 +78,16 @@ mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||
for p in virtualenvwrapper virtualenvwrapper_lazy ; do
|
||||
mv %{buildroot}%{_bindir}/$p %{buildroot}%{_bindir}/$p-%{py_ver}
|
||||
ln -s -f %{_sysconfdir}/alternatives/$p %{buildroot}%{_bindir}/$p
|
||||
# create a dummy target for /etc/alternatives/$p
|
||||
touch %{buildroot}%{_sysconfdir}/alternatives/$p
|
||||
done
|
||||
|
||||
%post
|
||||
"%_sbindir/update-alternatives" \
|
||||
%_sbindir/update-alternatives \
|
||||
--install %{_bindir}/virtualenvwrapper virtualenvwrapper %{_bindir}/virtualenvwrapper-%{py_ver} 30 \
|
||||
--slave %{_bindir}/virtualenvwrapper_lazy virtualenvwrapper_lazy %{_bindir}/virtualenvwrapper_lazy-%{py_ver}
|
||||
|
||||
%postun
|
||||
%preun
|
||||
if [ $1 -eq 0 ] ; then
|
||||
"%_sbindir/update-alternatives" --remove virtualenvwrapper %{_bindir}/virtualenvwrapper-%{py_ver}
|
||||
%_sbindir/update-alternatives --remove virtualenvwrapper %{_bindir}/virtualenvwrapper-%{py_ver}
|
||||
fi
|
||||
|
||||
# %check
|
||||
|
||||
Reference in New Issue
Block a user