forked from pool/python-virtualenv-clone
Accepting request 489350 from home:TheBlackCat:branches:devel:languages:python
Implement single-spec version OBS-URL: https://build.opensuse.org/request/show/489350 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-virtualenv-clone?expand=0&rev=10
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Apr 19 15:38:16 UTC 2017 - toddrme2178@gmail.com
|
||||||
|
|
||||||
|
- Implement single-spec version.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Feb 29 12:14:12 UTC 2016 - someuniquename@gmail.com
|
Mon Feb 29 12:14:12 UTC 2016 - someuniquename@gmail.com
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-virtualenv-clone
|
# spec file for package python-virtualenv-clone
|
||||||
#
|
#
|
||||||
# Copyright (c) 2016 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2017 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -16,6 +16,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
Name: python-virtualenv-clone
|
Name: python-virtualenv-clone
|
||||||
Version: 0.2.6
|
Version: 0.2.6
|
||||||
Release: 0
|
Release: 0
|
||||||
@@ -23,18 +24,17 @@ Summary: Script to clone virtualenvs
|
|||||||
License: MIT
|
License: MIT
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
Url: http://github.com/edwardgeorge/virtualenv-clone
|
Url: http://github.com/edwardgeorge/virtualenv-clone
|
||||||
Source: virtualenv-clone-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/v/virtualenv-clone/virtualenv-clone-%{version}.tar.gz
|
||||||
BuildRequires: python-devel
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-setuptools
|
BuildRequires: python-rpm-macros
|
||||||
|
BuildRequires: %{python_module devel}
|
||||||
|
BuildRequires: %{python_module setuptools}
|
||||||
Recommends: python-virtualenv
|
Recommends: python-virtualenv
|
||||||
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
|
|
||||||
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
|
||||||
%else
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
%endif
|
%python_subpackages
|
||||||
|
|
||||||
%description
|
%description
|
||||||
virtualenv cloning script.
|
virtualenv cloning script.
|
||||||
@@ -73,32 +73,25 @@ It performs the following:
|
|||||||
%setup -q -n virtualenv-clone-%{version}
|
%setup -q -n virtualenv-clone-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
python setup.py build
|
%python_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
%python_install
|
||||||
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
# setup up update-alternatives
|
# setup up update-alternatives
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
%python_clone -a %{buildroot}%{_bindir}/virtualenv-clone
|
||||||
touch %{buildroot}%{_sysconfdir}/alternatives/virtualenv-clone
|
|
||||||
mv %{buildroot}%{_bindir}/virtualenv-clone %{buildroot}%{_bindir}/virtualenv-clone-%{py_ver}
|
|
||||||
ln -sf %{_sysconfdir}/alternatives/virtualenv-clone %{buildroot}/%{_bindir}/virtualenv-clone
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
update-alternatives \
|
%python_install_alternative virtualenv-clone
|
||||||
--install %{_bindir}/virtualenv-clone virtualenv-clone %{_bindir}/virtualenv-clone-%{py_ver} 30
|
|
||||||
|
|
||||||
%postun
|
%preun
|
||||||
if [ $1 -eq 0 ] ; then
|
%python_uninstall_alternative virtualenv-clone
|
||||||
update-alternatives --remove virtualenv-clone %{_bindir}/virtualenv-clone-%{py_ver}
|
|
||||||
fi
|
|
||||||
|
|
||||||
%files
|
%files %{python_files}
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc LICENSE README
|
%doc LICENSE README
|
||||||
%{_bindir}/virtualenv-clone
|
%python_alternative %{_bindir}/virtualenv-clone
|
||||||
%{_bindir}/virtualenv-clone-%{py_ver}
|
|
||||||
%ghost %{_sysconfdir}/alternatives/virtualenv-clone
|
|
||||||
%{python_sitelib}/*
|
%{python_sitelib}/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
|||||||
Reference in New Issue
Block a user