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