]> git.pld-linux.org Git - packages/python-virtualenv.git/blob - python-virtualenv.spec
d359e3e47c58dfc8d275f412b5dfa118491fd3f2
[packages/python-virtualenv.git] / python-virtualenv.spec
1 #
2 # Conditional build:
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
7
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
12 Version:        20.13.0
13 Release:        2
14 License:        MIT
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/
21 %if %{with python2}
22 BuildRequires:  python >= 1:2.7
23 BuildRequires:  python-modules >= 1:2.7.10-6
24 BuildRequires:  python-setuptools
25 %if %{with tests}
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
33 %endif
34 %endif
35 %if %{with python3}
36 BuildRequires:  python3 >= 1:3.4
37 BuildRequires:  python3-modules >= 1:3.5.0-6
38 BuildRequires:  python3-setuptools
39 %if %{with tests}
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
45 %endif
46 %endif
47 %if %{with doc}
48 BuildRequires:  sphinx-pdg
49 %endif
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
62 BuildArch:      noarch
63 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
64
65 %description
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
70 license.
71
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.
77
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
89
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
95 license.
96
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.
102
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
107 %if %{with python3}
108 Requires:       python3-virtualenv = %{version}-%{release}
109 %else
110 Requires:       python-virtualenv = %{version}-%{release}
111 %endif
112
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
118 license.
119
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.
125
126 %prep
127 %setup -q -n virtualenv-%{version}
128 %patch0 -p1
129
130 %build
131 %if %{with python2}
132 %py_build %{?with_tests:test}
133 %endif
134
135 %if %{with python3}
136 %py3_build %{?with_tests:test}
137 %endif
138
139 %if %{with doc}
140 %{__make} -C docs text
141 %endif
142
143 %install
144 rm -rf $RPM_BUILD_ROOT
145
146 %if %{with python2}
147 %py_install
148 cp -p $RPM_BUILD_ROOT%{_bindir}/virtualenv{,-2}
149 %endif
150
151 %if %{with python3}
152 %py3_install
153 cp -p $RPM_BUILD_ROOT%{_bindir}/virtualenv{,-3}
154 %endif
155
156 %clean
157 rm -rf $RPM_BUILD_ROOT
158
159 %if %{with python2}
160 %files
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
166 %endif
167
168 %if %{with python3}
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
175 %endif
176
177 %files -n virtualenv
178 %defattr(644,root,root,755)
179 %attr(755,root,root) %{_bindir}/virtualenv
This page took 0.154186 seconds and 2 git commands to generate.