3 %bcond_with doc # Sphinx documentation
4 %bcond_without tests # pytest tests
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
8 %define module virtualenv
9 Summary: Tool to create isolated Python environments
10 Summary(pl.UTF-8): Narzędzie do tworzenia oddzielonych środowisk Pythona
11 Name: python-virtualenv
15 Group: Development/Languages
16 #Source0Download: https://pypi.org/simple/virtualenv/
17 Source0: https://files.pythonhosted.org/packages/source/v/virtualenv/virtualenv-%{version}.tar.gz
18 # Source0-md5: 95176f0639dc033650f0f3f9fdff299e
19 Patch0: multilib.patch
20 URL: https://pypi.org/project/virtualenv/
22 BuildRequires: python >= 1:2.7
23 BuildRequires: python-modules >= 1:2.7.10-6
24 BuildRequires: python-setuptools
26 BuildRequires: python-distlib >= 0.3.1
27 BuildRequires: python-filelock >= 3.2
28 BuildRequires: python-importlib_resources >= 1
29 BuildRequires: python-pathlib2 >= 2.3.3
30 BuildRequires: python-platformdirs >= 2
31 BuildRequires: python-pytest
32 BuildRequires: python-six >= 1.9
36 BuildRequires: python3 >= 1:3.4
37 BuildRequires: python3-modules >= 1:3.5.0-6
38 BuildRequires: python3-setuptools
40 BuildRequires: python3-distlib >= 0.3.1
41 BuildRequires: python3-filelock >= 3.2
42 BuildRequires: python3-platformdirs >= 2
43 BuildRequires: python3-pytest
44 BuildRequires: python3-six >= 1.9
48 BuildRequires: sphinx-pdg
50 BuildRequires: rpm-pythonprov
51 BuildRequires: rpmbuild(macros) >= 1.714
52 # Blame binary-only python packages authors
53 # virtualenv wants *.py
54 Requires: python-devel-src >= 1:2.7
55 Requires: python-distlib >= 0.3.1
56 Requires: python-filelock >= 3.2
57 Requires: python-pathlib2 >= 2.3.3
58 Requires: python-platformdirs >= 2
59 # for virtualenv-2 wrapper
60 Requires: python-setuptools
61 Requires: python-six >= 1.9
63 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
66 virtualenv is a tool to create isolated Python environments.
67 virtualenv is a successor to workingenv, and an extension of
68 virtual-python. It is written by Ian Bicking, and sponsored by the
69 Open Planning Project. It is licensed under an MIT-style permissive
72 %description -l pl.UTF-8
73 virtualenv to narzędzie do tworzenia oddzielonych środowisk Pythona.
74 Jest to następca workignenv i rozszerzenie virtual-pythona. Jest
75 tworzone przez Iana Bickinga i sponsorowane przez Open Planning
76 Project. Zostało wydane na liberalnej licencji w stylu MIT.
78 %package -n python3-%{module}
79 Summary: Tool to create isolated Python environments
80 Summary(pl.UTF-8): Narzędzie do tworzenia oddzielonych środowisk Pythona
81 Group: Libraries/Python
82 Requires: python3-distlib >= 0.3.1
83 Requires: python3-filelock >= 3.2
84 Requires: python3-modules >= 1:3.4
85 Requires: python3-platformdirs >= 2
86 # for virtualenv-3 wrapper
87 Requires: python3-setuptools
88 Requires: python3-six >= 1.9
90 %description -n python3-%{module}
91 virtualenv is a tool to create isolated Python environments.
92 virtualenv is a successor to workingenv, and an extension of
93 virtual-python. It is written by Ian Bicking, and sponsored by the
94 Open Planning Project. It is licensed under an MIT-style permissive
97 %description -n python3-%{module} -l pl.UTF-8
98 virtualenv to narzędzie do tworzenia oddzielonych środowisk Pythona.
99 Jest to następca workignenv i rozszerzenie virtual-pythona. Jest
100 tworzone przez Iana Bickinga i sponsorowane przez Open Planning
101 Project. Zostało wydane na liberalnej licencji w stylu MIT.
103 %package -n virtualenv
104 Summary: Tool to create isolated Python environments
105 Summary(pl.UTF-8): Narzędzie do tworzenia oddzielonych środowisk Pythona
106 Group: Libraries/Python
108 Requires: python3-virtualenv = %{version}-%{release}
110 Requires: python-virtualenv = %{version}-%{release}
113 %description -n virtualenv
114 virtualenv is a tool to create isolated Python environments.
115 virtualenv is a successor to workingenv, and an extension of
116 virtual-python. It is written by Ian Bicking, and sponsored by the
117 Open Planning Project. It is licensed under an MIT-style permissive
120 %description -n virtualenv -l pl.UTF-8
121 virtualenv to narzędzie do tworzenia oddzielonych środowisk Pythona.
122 Jest to następca workignenv i rozszerzenie virtual-pythona. Jest
123 tworzone przez Iana Bickinga i sponsorowane przez Open Planning
124 Project. Zostało wydane na liberalnej licencji w stylu MIT.
127 %setup -q -n virtualenv-%{version}
132 %py_build %{?with_tests:test}
136 %py3_build %{?with_tests:test}
140 %{__make} -C docs text
144 rm -rf $RPM_BUILD_ROOT
148 cp -p $RPM_BUILD_ROOT%{_bindir}/virtualenv{,-2}
153 cp -p $RPM_BUILD_ROOT%{_bindir}/virtualenv{,-3}
157 rm -rf $RPM_BUILD_ROOT
161 %defattr(644,root,root,755)
162 %doc LICENSE README.md %{?with_doc:docs/_build/text/*.txt}
163 %attr(755,root,root) %{_bindir}/virtualenv-2
164 %{py_sitescriptdir}/virtualenv-%{version}-py*.egg-info
165 %{py_sitescriptdir}/virtualenv
169 %files -n python3-%{module}
170 %defattr(644,root,root,755)
171 %doc LICENSE README.md %{?with_doc:docs/_build/text/*.txt}
172 %attr(755,root,root) %{_bindir}/virtualenv-3
173 %{py3_sitescriptdir}/virtualenv-%{version}-py*.egg-info
174 %{py3_sitescriptdir}/virtualenv
178 %defattr(644,root,root,755)
179 %attr(755,root,root) %{_bindir}/virtualenv