forked from pool/python-virtualenv
Accepting request 424646 from home:apersaud:branches:devel:languages:python
update to latest version, fix update-alternatives to be the same as for dlp3 OBS-URL: https://build.opensuse.org/request/show/424646 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-virtualenv?expand=0&rev=52
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-virtualenv
|
||||
#
|
||||
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2016 SUSE LINUX 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,7 +17,7 @@
|
||||
|
||||
|
||||
Name: python-virtualenv
|
||||
Version: 13.1.2
|
||||
Version: 15.0.0
|
||||
Release: 0
|
||||
Url: http://www.virtualenv.org/
|
||||
Summary: Virtual Python Environment builder
|
||||
@@ -65,18 +65,15 @@ python setup.py build
|
||||
|
||||
%install
|
||||
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||
# Remove script copy and replace with symlink to please u-a:
|
||||
rm %{buildroot}%{_bindir}/virtualenv
|
||||
ln -s %{_bindir}/virtualenv-%{py_ver} %{buildroot}%{_bindir}/virtualenv
|
||||
|
||||
%pre
|
||||
# Since /usr/bin/virtualenv 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 ] || rm -f %{_bindir}/virtualenv
|
||||
# create update-alternatives
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||
mv %{buildroot}%{_bindir}/virtualenv %{buildroot}%{_bindir}/virtualenv-%{py_ver}
|
||||
ln -s -f %{_sysconfdir}/alternatives/virtualenv %{buildroot}%{_bindir}/virtualenv
|
||||
touch %{buildroot}%{_sysconfdir}/alternatives/virtualenv
|
||||
|
||||
%post
|
||||
update-alternatives \
|
||||
--install %{_bindir}/virtualenv virtualenv %{_bindir}/virtualenv-%{py_ver} 20
|
||||
--install %{_bindir}/virtualenv virtualenv %{_bindir}/virtualenv-%{py_ver} 20
|
||||
|
||||
%preun
|
||||
if [ $1 -eq 0 ] ; then
|
||||
@@ -86,11 +83,9 @@ fi
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc LICENSE.txt README.rst
|
||||
%ghost %{_bindir}/virtualenv
|
||||
%{_bindir}/virtualenv
|
||||
%{_bindir}/virtualenv-%{py_ver}
|
||||
%{python_sitelib}/virtualenv*
|
||||
%if 0%{?suse_version} >= 1230
|
||||
%ghost %{_sysconfdir}/alternatives/virtualenv
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
|
||||
Reference in New Issue
Block a user