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