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