14
0

Accepting request 203051 from devel:languages:python

Implement update-alternatives (forwarded request 203050 from posophe)

OBS-URL: https://build.opensuse.org/request/show/203051
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-virtualenvwrapper?expand=0&rev=13
This commit is contained in:
Tomáš Chvátal
2013-10-14 12:30:52 +00:00
committed by Git OBS Bridge
4 changed files with 62 additions and 8 deletions

View File

@@ -1,3 +1,29 @@
-------------------------------------------------------------------
Sat Oct 12 16:42:19 UTC 2013 - p.drouand@gmail.com
- Implement update-alternative
-------------------------------------------------------------------
Sat Oct 12 15:29:13 UTC 2013 - p.drouand@gmail.com
- Update to version 4.1.1
+ Fix packaging issue with 4.1
- Changes between version 4.1 and 4.0
+ Ensure that all $() style commands that produce paths are quoted.
Addresses issue 164.
+ Add wipeenv command for removing all packages installed in the virtualenv.
+ Allow users of virtualenvwrapper_lazy.sh to extend the list of API
commands that trigger the lazy-loader by extending _VIRTUALENVWRAPPER_API.
+ Fix detection of --python option to mkvirtualenv. Resolves issue 190.
+ Add allvirtualenv command to run a command across all virtualenvs.
+ Fix lsvirtualenv when there are spaces in WORKON_HOME.
Resolves issue 194.
+ Switch to pbr for packaging
- Add documentation from tarball and generated documentation
- Add python-pbr BuildRequirement; new build requirement needed to build
- Replace python-distribute with python-setuptools BuildRequires
- Use download URL as source
-------------------------------------------------------------------
Tue Apr 30 19:17:07 UTC 2013 - alexandre@exatati.com.br

View File

@@ -17,19 +17,22 @@
Name: python-virtualenvwrapper
Version: 4.0
Version: 4.1.1
Release: 0
Url: http://www.doughellmann.com/projects/virtualenvwrapper/
Summary: Enhancements to virtualenv
License: HPND
Group: Development/Languages/Python
Source: virtualenvwrapper-%{version}.tar.bz2
Source: https://pypi.python.org/packages/source/v/virtualenvwrapper/virtualenvwrapper-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: python-devel
BuildRequires: python-distribute
BuildRequires: python-pbr
BuildRequires: python-setuptools
Requires: python-stevedore
Requires: python-virtualenv
Requires: python-virtualenv-clone
Requires(post): update-alternatives
Requires(postun): 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
@@ -60,11 +63,36 @@ python setup.py build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
mv %{buildroot}%{_bindir}/virtualenvwrapper_lazy.sh %{buildroot}%{_bindir}/virtualenvwrapper_lazy-%{py_ver}.sh
mv %{buildroot}%{_bindir}/virtualenvwrapper.sh %{buildroot}%{_bindir}/virtualenvwrapper-%{py_ver}.sh
ln -s %{_bindir}/virtualenvwrapper-%{py_ver}.sh %{buildroot}%{_bindir}/virtualenvwrapper.sh
ln -s %{_bindir}/virtualenvwrapper_lazy-%{py_ver}.sh %{buildroot}%{_bindir}/virtualenvwrapper_lazy.sh
%pre
# Since python scripts became ghosted to be used with update-alternatives, we have to get rid
# of the old binary resulting from the non-update-alternativies-ified package:
[[ ! -L %{_bindir}/virtualenvwrapper.sh ]] && rm -f %{_bindir}/virtualenvwrapper.sh
[[ ! -L %{_bindir}/virtualenvwrapper_lazy.sh ]] && rm -f %{_bindir}/virtualenvwrapper_lazy.sh
exit 0
%post
update-alternatives \
--install %{_bindir}/virtualenvwrapper.sh virtualenvwrapper.sh %{_bindir}/virtualenvwrapper-%{py_ver}.sh 30 \
--slave %{_bindir}/virtualenvwrapper_lazy.sh virtualenvwrapper_lazy.sh %{_bindir}/virtualenvwrapper_lazy-%{py_ver}.sh
%preun
if [ $1 -eq 0 ] ; then
update-alternatives --remove virtualenvwrapper.sh %{_bindir}/virtualenvwrapper.sh-%{py_ver}
fi
%files
%defattr(-,root,root,-)
%doc README.txt README.ja.rst README.es.rst LICENSE announce.rst
%{python_sitelib}/*
%{_bindir}/virtualenvwrapper.sh
%{_bindir}/virtualenvwrapper_lazy.sh
%ghost %{_bindir}/virtualenvwrapper.sh
%{_bindir}/virtualenvwrapper-%{py_ver}.sh
%ghost %{_bindir}/virtualenvwrapper_lazy.sh
%{_bindir}/virtualenvwrapper_lazy-%{py_ver}.sh
%changelog

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bdc4249973c31757e5d69dcaec9f31cc8554c22b60fd407754ffb784b3b94205
size 128461

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:47ab05af0bc7f146bdd4a77a978e02a1f4e1db6a0546e836e2442fa0990d7d77
size 81070