]> git.pld-linux.org Git - packages/python-virtualenv-clone.git/blob - python-virtualenv-clone.spec
new, version 0.2.4
[packages/python-virtualenv-clone.git] / python-virtualenv-clone.spec
1 #
2 # Conditional build:
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
7
8 %define         module  virtualenv-clone
9 Summary:        Script to clone virtualenvs
10 Name:           python-virtualenv-clone
11 Version:        0.2.4
12 Release:        1
13 License:        MIT
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
20 %if %{with python2}
21 BuildRequires:  python-distribute
22 BuildRequires:  python-virtualenv
23 %endif
24 %if %{with python3}
25 BuildRequires:  python3-distribute
26 BuildRequires:  python3-virtualenv
27 %endif
28 Requires:       python-virtualenv
29 BuildArch:      noarch
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %description
33 A script for cloning a non-relocatable virtualenv.
34
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.
40
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.
44
45 %package -n python3-virtualenv-clone
46 Summary:        Script to clone virtualenvs
47 Group:          Development/Libraries
48 Requires:       python3-virtualenv
49
50 %description -n python3-virtualenv-clone
51 virtualenv cloning script.
52
53 A script for cloning a non-relocatable virtualenv.
54
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.
60
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.
64
65 %prep
66 %setup -q -n %{module}-%{version}
67
68 %build
69 %if %{with python2}
70 %{__python} setup.py build --build-base build-2
71 %endif
72
73 %if %{with python3}
74 %{__python3} setup.py build --build-base build-3
75 %endif
76
77 %install
78 rm -rf $RPM_BUILD_ROOT
79 %if %{with python2}
80 %{__python} setup.py \
81         build --build-base build-2 \
82         install --skip-build \
83         --optimize=2 \
84         --root=$RPM_BUILD_ROOT
85
86 %py_postclean
87 %endif
88
89 %if %{with python3}
90 %{__python3} setup.py \
91         build --build-base build-3 \
92         install --skip-build \
93         --optimize=2 \
94         --root=$RPM_BUILD_ROOT
95 %endif
96
97 %clean
98 rm -rf $RPM_BUILD_ROOT
99
100 %if %{with python2}
101 %files
102 %defattr(644,root,root,755)
103 %doc README
104 %attr(755,root,root) %{_bindir}/virtualenv-clone
105 %{py_sitescriptdir}/clonevirtualenv.py[co]
106 %{py_sitescriptdir}/virtualenv_clone-%{version}-py*.egg-info
107 %endif
108
109 %if %{with python3}
110 %files -n python3-%{module}
111 %defattr(644,root,root,755)
112 %doc README
113 %attr(755,root,root) %{_bindir}/virtualenv-clone
114 %{py3_sitescriptdir}/clonevirtualenv.*
115 %{py3_sitescriptdir}/virtualenv_clone-%{version}-*
116 %{py3_sitescriptdir}/__pycache__/*clonevirtualenv*
117 %endif
This page took 0.080973 seconds and 3 git commands to generate.