]> git.pld-linux.org Git - packages/python3-setuptools.git/blob - python-setuptools.spec
- updated to 42.0.2; easy_install is deprecated now
[packages/python3-setuptools.git] / python-setuptools.spec
1 #
2 # Conditional build:
3 %bcond_without  apidocs         # Sphinx based documentation
4 %bcond_with     system_libs     # use system modules (appdirs, packaging, pyparsing, six) # TODO
5 %bcond_with     tests           # py.test tests (few failures)
6 %bcond_with     bootstrap       # convenience alias for without: apidocs,system_libs,tests
7 %bcond_without  python2         # CPython 2.x module
8 %bcond_without  python3         # CPython 3.x module
9 %bcond_without  python3_default # Use Python 3.x for easy_install executable
10
11 %if %{without python3}
12 %undefine       python3_default
13 %endif
14 %if %{with bootstrap}
15 %undefine       with_apidocs
16 %undefine       with_system_libs
17 %undefine       with_tests
18 %endif
19
20 %define         module          setuptools
21 %define         pypi_name       setuptools
22 Summary:        A collection of enhancements to the Python distutils
23 Summary(pl.UTF-8):      Zestaw rozszerzeń dla pythonowych distutils
24 Name:           python-setuptools
25 Version:        42.0.2
26 Release:        1
27 Epoch:          1
28 License:        MIT
29 Group:          Development/Languages/Python
30 #Source0Download: https://pypi.org/simple/setuptools/
31 Source0:        https://files.pythonhosted.org/packages/source/s/setuptools/%{pypi_name}-%{version}.zip
32 # Source0-md5:  5ac69b66a6f7d4785517017f37df28e9
33 URL:            https://github.com/pypa/setuptools
34 %if %(locale -a | grep -q '^C\.utf8$'; echo $?)
35 BuildRequires:  glibc-localedb-all
36 %endif
37 %if %{with python2}
38 BuildRequires:  python-modules >= 1:2.7
39 %if %{with system_libs}
40 # versions from pkg_resources/_vendor/vendored.txt
41 BuildRequires:  python-appdirs >= 1.4.3
42 BuildRequires:  python-packaging >= 19.2
43 BuildRequires:  python-pyparsing >= 2.2.1
44 BuildRequires:  python-six >= 1.10.0
45 %endif
46 BuildConflicts: python-distribute < 0.7
47 %if %{with tests}
48 # https://raw.githubusercontent.com/pypa/setuptools/v%{version}/tests/requirements.txt
49 BuildRequires:  python-coverage >= 4.5.1
50 BuildRequires:  python-futures
51 BuildRequires:  python-mock
52 BuildRequires:  python-pip >= 19.1
53 BuildRequires:  python-pytest >= 3.7
54 BuildRequires:  python-pytest-cov >= 2.5.1
55 BuildRequires:  python-pytest-fixture-config
56 BuildRequires:  python-pytest-flake8
57 BuildRequires:  python-pytest-virtualenv >= 1.2.7
58 BuildRequires:  python-virtualenv >= 13.0.0
59 BuildRequires:  python-wheel
60 %endif
61 %endif
62 %if %{with python3}
63 BuildRequires:  python3-modules >= 1:3.4
64 %if %{with system_libs}
65 # versions from pkg_resources/_vendor/vendored.txt
66 BuildRequires:  python3-appdirs >= 1.4.3
67 BuildRequires:  python3-packaging >= 19.2
68 BuildRequires:  python3-pyparsing >= 2.2.1
69 BuildRequires:  python3-six >= 1.10.0
70 %endif
71 BuildConflicts: python3-distribute < 0.7
72 %if %{with tests}
73 BuildRequires:  python3-coverage >= 4.5.1
74 # FIXME: patch to use unittest.mock
75 #BuildRequires: python3-mock
76 %if "%{py3_ver}" >= "3.6"
77 BuildRequires:  python3-paver
78 %endif
79 BuildRequires:  python3-pip >= 19.1
80 BuildRequires:  python3-pytest >= 3.7
81 BuildRequires:  python3-pytest-cov >= 2.5.1
82 BuildRequires:  python3-pytest-fixture-config
83 BuildRequires:  python3-pytest-flake8
84 BuildRequires:  python3-pytest-virtualenv >= 1.2.7
85 BuildRequires:  python3-virtualenv >= 13.0.0
86 BuildRequires:  python3-wheel
87 %endif
88 %endif
89 %if %{with apidocs}
90 BuildRequires:  python3-jaraco
91 BuildRequires:  python3-jaraco.packaging >= 6.1
92 BuildRequires:  python3-rst.linker >= 1.9
93 BuildRequires:  python3-setuptools >= 34
94 BuildRequires:  sphinx-pdg-3 >= 1.4
95 %endif
96 BuildRequires:  rpm-pythonprov
97 BuildRequires:  rpmbuild(macros) >= 1.714
98 BuildRequires:  unzip
99 Requires:       python-modules >= 1:2.7
100 %if %{with system_libs}
101 # versions from pkg_resources/_vendor/vendored.txt
102 Requires:       python-appdirs >= 1.4.0
103 Requires:       python-packaging >= 16.8
104 Requires:       python-pyparsing >= 2.1.10
105 Requires:       python-six >= 1.10.0
106 %endif
107 Obsoletes:      python-distribute < 0.7
108 Obsoletes:      python-setuptools-devel
109 BuildArch:      noarch
110 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
111
112 %description
113 setuptools is a collection of enhancements to the Python distutils
114 that allow you to more easily build and distribute Python 2.x
115 packages, especially ones that have dependencies on other packages.
116
117 %description -l pl.UTF-8
118 setuptools to zestaw rozszerzeń do pythonowych distutils umożliwiający
119 łatwiejsze budowanie i rozprowadzanie pakietów Pythona 2.x,
120 szczególnie tych mających zależności od innych pakietów.
121
122 Ten pakiet zawiera składniki uruchomieniowe setuptools, potrzebne do
123 uruchamiania kodu wymagającego pkg_resources.py, przeznaczone dla
124 Pythona 2.x.
125
126 %package -n python3-%{module}
127 Summary:        A collection of enhancements to the Python distutils
128 Summary(pl.UTF-8):      Zestaw rozszerzeń dla pythonowych distutils
129 Group:          Libraries/Python
130 Requires:       python3-modules >= 1:3.4
131 %if %{with system_libs}
132 # versions from pkg_resources/_vendor/vendored.txt
133 Requires:       python3-appdirs >= 1.4.0
134 Requires:       python3-packaging >= 16.8
135 Requires:       python3-pyparsing >= 2.1.10
136 Requires:       python3-six >= 1.10.0
137 %endif
138 Obsoletes:      python3-distribute < 0.7
139
140 %description -n python3-%{module}
141 setuptools is a collection of enhancements to the Python distutils
142 that allow you to more easily build and distribute Python 3.x
143 packages, especially ones that have dependencies on other packages.
144
145 %description -n python3-%{module} -l pl.UTF-8
146 setuptools to zestaw rozszerzeń do pythonowych distutils umożliwiający
147 łatwiejsze budowanie i rozprowadzanie pakietów Pythona 3.x,
148 szczególnie tych mających zależności od innych pakietów.
149
150 %package -n easy_install
151 Summary:        Python software installer (deprecated)
152 Summary(pl.UTF-8):      Instalator oprogramowania napisanego w Pythonie (przestarzały)
153 Group:          Libraries/Python
154 %if %{with python3_default}
155 Requires:       python3-%{module} = %{epoch}:%{version}-%{release}
156 %else
157 Requires:       python-%{module} = %{epoch}:%{version}-%{release}
158 %endif
159 Conflicts:      python-setuptools < 1:18.6.1-2
160
161 %description -n easy_install
162 Python software installer. It's deprecated in favour of pip.
163
164 %description -n easy_install -l pl.UTF-8
165 Instalator oprogramowania napisanego w Pythonie. Jest przestarzały,
166 aktualnym zamiennikiem jest pip.
167
168 %package apidocs
169 Summary:        %{module} API documentation
170 Summary(pl.UTF-8):      Dokumentacja API %{module}
171 Group:          Documentation
172
173 %description apidocs
174 API documentation for %{module}.
175
176 %description apidocs -l pl.UTF-8
177 Dokumentacja API %{module}.
178
179 %prep
180 %setup -q -n %{module}-%{version}
181
182 %if %{with system_libs}
183 exit 1 # TODO: unvendor modules from pkg_resources/_vendor
184 %endif
185
186 %build
187 %if %{with python2}
188 LC_ALL=C.UTF-8 \
189 %py_build
190
191 %{?with_tests:%{__python} -m pytest pkg_resources/tests setuptools/tests tests}
192 %endif
193
194 %if %{with python3}
195 LC_ALL=C.UTF-8 \
196 %py3_build
197
198 %{?with_tests:%{__python3} -m pytest pkg_resources/tests setuptools/tests tests}
199 %endif
200
201 %if %{with apidocs}
202 %{__make} -C docs html SPHINXBUILD=sphinx-build-3
203 %endif
204
205 %install
206 rm -rf $RPM_BUILD_ROOT
207
208 %if %{with python3}
209 %py3_install
210 %endif
211
212 %if %{with python2}
213 %py_install
214
215 # note: setuptools/command/easy_install.py expects setuptools/site-patch.py to exist
216 %py_postclean -x site-patch.py
217 %endif
218
219 %if %{with python3_default}
220 ln -sf easy_install-%{py3_ver} $RPM_BUILD_ROOT%{_bindir}/easy_install
221 %else
222 ln -sf easy_install-%{py_ver} $RPM_BUILD_ROOT%{_bindir}/easy_install
223 %endif
224
225 %clean
226 rm -rf $RPM_BUILD_ROOT
227
228 %if %{with python2}
229 %files
230 %defattr(644,root,root,755)
231 %doc CHANGES.rst LICENSE README.rst
232 %attr(755,root,root) %{_bindir}/easy_install-%{py_ver}
233 %{py_sitescriptdir}/pkg_resources
234 %{py_sitescriptdir}/setuptools
235 %{py_sitescriptdir}/easy_install.py[co]
236 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
237 %endif
238
239 %if %{with python3}
240 %files -n python3-%{module}
241 %defattr(644,root,root,755)
242 %doc CHANGES.rst LICENSE README.rst
243 %attr(755,root,root) %{_bindir}/easy_install-%{py3_ver}
244 %{py3_sitescriptdir}/__pycache__/easy_install.*.py[co]
245 %{py3_sitescriptdir}/pkg_resources
246 %{py3_sitescriptdir}/setuptools
247 %{py3_sitescriptdir}/easy_install.py
248 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
249 %endif
250
251 %files -n easy_install
252 %defattr(644,root,root,755)
253 %attr(755,root,root) %{_bindir}/easy_install
254
255 %if %{with apidocs}
256 %files apidocs
257 %defattr(644,root,root,755)
258 %doc docs/build/html/{_static,*.html,*.js}
259 %endif
This page took 0.187651 seconds and 3 git commands to generate.