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