]> git.pld-linux.org Git - packages/python-virtualenv.git/blob - python-virtualenv.spec
e0981b0873e3841094639a99c9e9bc66faa7b261
[packages/python-virtualenv.git] / python-virtualenv.spec
1 # TODO: finish doc and tests (BRs)
2 #
3 # Conditional build:
4 %bcond_with     doc     # Sphinx documentation
5 %bcond_with     tests   # pytest tests
6 %bcond_without  python2 # CPython 2.x module
7 %bcond_without  python3 # CPython 3.x module
8
9 %define module  virtualenv
10 Summary:        Tool to create isolated Python environments
11 Summary(pl.UTF-8):      Narzędzie do tworzenia oddzielonych środowisk Pythona
12 Name:           python-virtualenv
13 Version:        20.13.0
14 Release:        2
15 License:        MIT
16 Group:          Development/Languages
17 #Source0Download: https://pypi.org/simple/virtualenv/
18 Source0:        https://files.pythonhosted.org/packages/source/v/virtualenv/virtualenv-%{version}.tar.gz
19 # Source0-md5:  95176f0639dc033650f0f3f9fdff299e
20 Patch0:         multilib.patch
21 URL:            https://pypi.org/project/virtualenv/
22 %if %{with python2}
23 BuildRequires:  python >= 1:2.7
24 BuildRequires:  python-modules >= 1:2.7.10-6
25 BuildRequires:  python-setuptools >= 1:41
26 BuildRequires:  python-setuptools_scm >= 2
27 %if %{with tests}
28 # runtime dependencies
29 BuildRequires:  python-distlib >= 0.3.1
30 BuildRequires:  python-distlib < 1
31 BuildRequires:  python-filelock >= 3.2
32 BuildRequires:  python-filelock < 4
33 BuildRequires:  python-importlib_metadata >= 0.12
34 BuildRequires:  python-importlib_resources >= 1.0
35 BuildRequires:  python-pathlib2 >= 2.3.3
36 BuildRequires:  python-pathlib2 < 3
37 BuildRequires:  python-platformdirs >= 2
38 BuildRequires:  python-platformdirs < 3
39 BuildRequires:  python-six >= 1.9
40 BuildRequires:  python-six < 2
41 # test-only dependencies
42 BuildRequires:  python-coverage >= 4
43 BuildRequires:  python-coverage-enable-subprocess >= 1
44 BuildRequires:  python-flaky >= 3
45 BuildRequires:  python-pytest >= 4
46 BuildRequires:  python-pytest-env >= 0.6.2
47 BuildRequires:  python-pytest-freezegun >= 0.4.1
48 BuildRequires:  python-pytest-mock >= 2
49 BuildRequires:  python-pytest-randomly >= 1
50 BuildRequires:  python-pytest-timeout >= 1
51 %endif
52 %endif
53 %if %{with python3}
54 BuildRequires:  python3 >= 1:3.5
55 BuildRequires:  python3-modules >= 1:3.5.0-6
56 BuildRequires:  python3-setuptools >= 1:41
57 BuildRequires:  python3-setuptools_scm >= 2
58 %if %{with tests}
59 # runtime dependencies
60 BuildRequires:  python3-distlib >= 0.3.1
61 BuildRequires:  python3-distlib < 1
62 BuildRequires:  python3-filelock >= 3.2
63 BuildRequires:  python3-filelock < 4
64 %if "%{py3_ver}" < "3.8"
65 BuildRequires:  python3-importlib-metadata >= 0.12
66 %endif
67 %if "%{py3_ver}" < "3.7"
68 BuildRequires:  python3-importlib-resources >= 1.0
69 %endif
70 BuildRequires:  python3-platformdirs >= 2
71 BuildRequires:  python3-platformdirs < 3
72 BuildRequires:  python3-pytest
73 BuildRequires:  python3-six >= 1.9
74 BuildRequires:  python3-six < 2
75 # test-only dependencies
76 BuildRequires:  python-coverage >= 4
77 BuildRequires:  python-coverage-enable-subprocess >= 1
78 BuildRequires:  python-flaky >= 3
79 BuildRequires:  python-packaging >= 20.0
80 BuildRequires:  python-pytest >= 4
81 BuildRequires:  python-pytest-env >= 0.6.2
82 BuildRequires:  python-pytest-freezegun >= 0.4.1
83 BuildRequires:  python-pytest-mock >= 2
84 BuildRequires:  python-pytest-randomly >= 1
85 BuildRequires:  python-pytest-timeout >= 1
86 %endif
87 %endif
88 %if %{with doc}
89 BuildRequires:  python3-sphinx-argparse >= 0.2.5
90 BuildRequires:  python3-sphinx_rtd_theme >= 0.4.3
91 BuildRequires:  python3-proselint >= 0.10.2
92 BuildRequires:  python3-towncrier >= 21.3
93 BuildRequires:  sphinx-pdg >= 3
94 %endif
95 BuildRequires:  rpm-pythonprov
96 BuildRequires:  rpmbuild(macros) >= 1.714
97 # Blame binary-only python packages authors
98 # virtualenv wants *.py
99 Requires:       python-devel-src >= 1:2.7
100 Requires:       python-distlib >= 0.3.1
101 Requires:       python-filelock >= 3.2
102 Requires:       python-pathlib2 >= 2.3.3
103 Requires:       python-platformdirs >= 2
104 # for virtualenv-2 wrapper
105 Requires:       python-setuptools
106 Requires:       python-six >= 1.9
107 BuildArch:      noarch
108 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
109
110 %description
111 virtualenv is a tool to create isolated Python environments.
112 virtualenv is a successor to workingenv, and an extension of
113 virtual-python. It is written by Ian Bicking, and sponsored by the
114 Open Planning Project. It is licensed under an MIT-style permissive
115 license.
116
117 %description -l pl.UTF-8
118 virtualenv to narzędzie do tworzenia oddzielonych środowisk Pythona.
119 Jest to następca workignenv i rozszerzenie virtual-pythona. Jest
120 tworzone przez Iana Bickinga i sponsorowane przez Open Planning
121 Project. Zostało wydane na liberalnej licencji w stylu MIT.
122
123 %package -n python3-%{module}
124 Summary:        Tool to create isolated Python environments
125 Summary(pl.UTF-8):      Narzędzie do tworzenia oddzielonych środowisk Pythona
126 Group:          Libraries/Python
127 Requires:       python3-distlib >= 0.3.1
128 Requires:       python3-filelock >= 3.2
129 Requires:       python3-modules >= 1:3.4
130 Requires:       python3-platformdirs >= 2
131 # for virtualenv-3 wrapper
132 Requires:       python3-setuptools
133 Requires:       python3-six >= 1.9
134
135 %description -n python3-%{module}
136 virtualenv is a tool to create isolated Python environments.
137 virtualenv is a successor to workingenv, and an extension of
138 virtual-python. It is written by Ian Bicking, and sponsored by the
139 Open Planning Project. It is licensed under an MIT-style permissive
140 license.
141
142 %description -n python3-%{module} -l pl.UTF-8
143 virtualenv to narzędzie do tworzenia oddzielonych środowisk Pythona.
144 Jest to następca workignenv i rozszerzenie virtual-pythona. Jest
145 tworzone przez Iana Bickinga i sponsorowane przez Open Planning
146 Project. Zostało wydane na liberalnej licencji w stylu MIT.
147
148 %package -n virtualenv
149 Summary:        Tool to create isolated Python environments
150 Summary(pl.UTF-8):      Narzędzie do tworzenia oddzielonych środowisk Pythona
151 Group:          Libraries/Python
152 %if %{with python3}
153 Requires:       python3-virtualenv = %{version}-%{release}
154 %else
155 Requires:       python-virtualenv = %{version}-%{release}
156 %endif
157
158 %description -n virtualenv
159 virtualenv is a tool to create isolated Python environments.
160 virtualenv is a successor to workingenv, and an extension of
161 virtual-python. It is written by Ian Bicking, and sponsored by the
162 Open Planning Project. It is licensed under an MIT-style permissive
163 license.
164
165 %description -n virtualenv -l pl.UTF-8
166 virtualenv to narzędzie do tworzenia oddzielonych środowisk Pythona.
167 Jest to następca workignenv i rozszerzenie virtual-pythona. Jest
168 tworzone przez Iana Bickinga i sponsorowane przez Open Planning
169 Project. Zostało wydane na liberalnej licencji w stylu MIT.
170
171 %prep
172 %setup -q -n virtualenv-%{version}
173 %patch0 -p1
174
175 %build
176 %if %{with python2}
177 %py_build
178
179 %if %{with tests}
180 %{__python} -m pytest tests
181 %endif
182 %endif
183
184 %if %{with python3}
185 %py3_build
186
187 %if %{with tests}
188 %{__python3} -m pytest tests
189 %endif
190 %endif
191
192 %if %{with doc}
193 %{__make} -C docs text
194 %endif
195
196 %install
197 rm -rf $RPM_BUILD_ROOT
198
199 %if %{with python2}
200 %py_install
201 cp -p $RPM_BUILD_ROOT%{_bindir}/virtualenv{,-2}
202 %endif
203
204 %if %{with python3}
205 %py3_install
206 cp -p $RPM_BUILD_ROOT%{_bindir}/virtualenv{,-3}
207 %endif
208
209 %clean
210 rm -rf $RPM_BUILD_ROOT
211
212 %if %{with python2}
213 %files
214 %defattr(644,root,root,755)
215 %doc LICENSE README.md %{?with_doc:docs/_build/text/*.txt}
216 %attr(755,root,root) %{_bindir}/virtualenv-2
217 %{py_sitescriptdir}/virtualenv
218 %{py_sitescriptdir}/virtualenv-%{version}-py*.egg-info
219 %endif
220
221 %if %{with python3}
222 %files -n python3-%{module}
223 %defattr(644,root,root,755)
224 %doc LICENSE README.md %{?with_doc:docs/_build/text/*.txt}
225 %attr(755,root,root) %{_bindir}/virtualenv-3
226 %{py3_sitescriptdir}/virtualenv
227 %{py3_sitescriptdir}/virtualenv-%{version}-py*.egg-info
228 %endif
229
230 %files -n virtualenv
231 %defattr(644,root,root,755)
232 %attr(755,root,root) %{_bindir}/virtualenv
This page took 0.066647 seconds and 2 git commands to generate.