3 %bcond_without doc # don't build doc
4 %bcond_without tests # do not perform "make test"
5 %bcond_without python2 # CPython 2.x module
6 %bcond_with python3 # CPython 3.x module
8 %define module virtualenv-clone
9 Summary: Script to clone virtualenvs
10 Name: python-virtualenv-clone
14 Group: Development/Libraries
15 Source0: http://pypi.python.org/packages/source/v/%{module}/%{module}-%{version}.tar.gz
16 # Source0-md5: 71168b975eaaa91e65559bcc79290b3b
17 URL: http://pypi.python.org/pypi/virtualenv-clone
18 BuildRequires: rpm-pythonprov
19 BuildRequires: rpmbuild(macros) >= 1.219
21 BuildRequires: python-distribute
22 BuildRequires: python-virtualenv
25 BuildRequires: python3-distribute
26 BuildRequires: python3-virtualenv
28 Requires: python-virtualenv
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 A script for cloning a non-relocatable virtualenv.
35 Virtualenv provides a way to make virtualenv's relocatable which could
36 then be copied as we wanted. However making a virtualenv relocatable
37 this way breaks the no-site-packages isolation of the virtualenv as
38 well as other aspects that come with relative paths and '/usr/bin/env'
39 shebangs that may be undesirable.
41 Also, the .pth and .egg-link rewriting doesn't seem to work as
42 intended. This attempts to overcome these issues and provide a way to
43 easily clone an existing virtualenv.
45 %package -n python3-virtualenv-clone
46 Summary: Script to clone virtualenvs
47 Group: Development/Libraries
48 Requires: python3-virtualenv
50 %description -n python3-virtualenv-clone
51 virtualenv cloning script.
53 A script for cloning a non-relocatable virtualenv.
55 Virtualenv provides a way to make virtualenv's relocatable which could
56 then be copied as we wanted. However making a virtualenv relocatable
57 this way breaks the no-site-packages isolation of the virtualenv as
58 well as other aspects that come with relative paths and '/usr/bin/env'
59 shebangs that may be undesirable.
61 Also, the .pth and .egg-link rewriting doesn't seem to work as
62 intended. This attempts to overcome these issues and provide a way to
63 easily clone an existing virtualenv.
66 %setup -q -n %{module}-%{version}
70 %{__python} setup.py build --build-base build-2
74 %{__python3} setup.py build --build-base build-3
78 rm -rf $RPM_BUILD_ROOT
80 %{__python} setup.py \
81 build --build-base build-2 \
82 install --skip-build \
84 --root=$RPM_BUILD_ROOT
90 %{__python3} setup.py \
91 build --build-base build-3 \
92 install --skip-build \
94 --root=$RPM_BUILD_ROOT
98 rm -rf $RPM_BUILD_ROOT
102 %defattr(644,root,root,755)
104 %attr(755,root,root) %{_bindir}/virtualenv-clone
105 %{py_sitescriptdir}/clonevirtualenv.py[co]
106 %{py_sitescriptdir}/virtualenv_clone-%{version}-py*.egg-info
110 %files -n python3-%{module}
111 %defattr(644,root,root,755)
113 %attr(755,root,root) %{_bindir}/virtualenv-clone
114 %{py3_sitescriptdir}/clonevirtualenv.*
115 %{py3_sitescriptdir}/virtualenv_clone-%{version}-*
116 %{py3_sitescriptdir}/__pycache__/*clonevirtualenv*