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