14
0

Accepting request 263630 from home:TheBlackCat:branches:devel:languages:python

Update to 2.5

OBS-URL: https://build.opensuse.org/request/show/263630
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-virtualenv-clone?expand=0&rev=5
This commit is contained in:
Todd R
2014-12-01 16:17:36 +00:00
committed by Git OBS Bridge
parent 25ba856f41
commit 07ccdee129
4 changed files with 41 additions and 8 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-virtualenv-clone
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,19 +17,21 @@
Name: python-virtualenv-clone
Version: 0.2.4
Version: 0.2.5
Release: 0
Summary: Script to clone virtualenvs
License: MIT
Group: Development/Languages/Python
Url: http://github.com/edwardgeorge/virtualenv-clone
Source: virtualenv-clone-%{version}.tar.bz2
Source: virtualenv-clone-%{version}.tar.gz
BuildRequires: python-devel
BuildRequires: python-setuptools
Recommends: python-virtualenv
Requires(post): update-alternatives
Requires(postun): 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()")}
%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%else
BuildArch: noarch
%endif
@@ -75,10 +77,28 @@ python setup.py build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
mv %{buildroot}%{_bindir}/virtualenv-clone %{buildroot}%{_bindir}/virtualenv-clone-%{py_ver}
ln -s %{_bindir}/virtualenv-clone-%{py_ver} %{buildroot}%{_bindir}/virtualenv-clone
%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:
[ -h %{_bindir}/virtualenv-clone ] || rm -f %{_bindir}/virtualenv-clone
%post
update-alternatives \
--install %{_bindir}/virtualenv-clone virtualenv-clone %{_bindir}/virtualenv-clone-%{py_ver} 30
%preun
if [ $1 -eq 0 ] ; then
update-alternatives --remove virtualenv-clone %{_bindir}/virtualenv-clone-%{py_ver}
fi
%files
%defattr(-,root,root,-)
%doc LICENSE README
%ghost %{_bindir}/virtualenv-clone
%{_bindir}/virtualenv-clone-%{py_ver}
%{python_sitelib}/*
%{_bindir}/virtualenv-clone
%changelog