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