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