]> git.pld-linux.org Git - packages/python3-setuptools.git/blame - python-setuptools.spec
up to 40.2.0
[packages/python3-setuptools.git] / python-setuptools.spec
CommitLineData
2f649423
MK
1#
2# Conditional build:
e2cd79ed 3%bcond_without apidocs # Sphinx based documentation
6502ae9a 4%bcond_with tests # py.test tests (few failures)
e2cd79ed
JB
5%bcond_without python2 # CPython 2.x module
6%bcond_without python3 # CPython 3.x module
25fb9ea9
JK
7%bcond_without python3_default # Use Python 3.x for easy_install executable
8
9%if %{without python3}
10%undefine python3_default
11%endif
2f649423 12
cb552c1a 13%define module setuptools
b79e62bc 14Summary: A collection of enhancements to the Python distutils
e4a6c4e2 15Summary(pl.UTF-8): Zestaw rozszerzeń dla pythonowych distutils
b79e62bc 16Name: python-setuptools
be14e546
JP
17Version: 40.2.0
18Release: 1
67093d8e 19Epoch: 1
2f649423 20License: PSF or ZPL
b79e62bc 21Group: Development/Languages/Python
e2cd79ed 22#Source0Download: https://pypi.python.org/simple/setuptools/
be14e546
JP
23Source0: https://files.pythonhosted.org/packages/ef/1d/201c13e353956a1c840f5d0fbf0461bd45bbd678ea4843ebf25924e8984c/setuptools-%{version}.zip
24# Source0-md5: 592efabea3a65d8e97a025ed52f69b12
1ca207b5 25URL: https://github.com/pypa/setuptools
6502ae9a 26%if %(locale -a | grep -q '^C.UTF-8$'; echo $?)
c034c756
JB
27BuildRequires: glibc-localedb-all
28%endif
2f649423 29%if %{with python2}
724eed28 30BuildRequires: python-appdirs >= 1.4.0
c034c756 31BuildRequires: python-modules >= 1:2.6
af1d3d4d 32BuildRequires: python-packaging >= 16.8
b6cbc91d 33BuildConflicts: python-distribute < 0.7
929b3f4d 34BuildRequires: python-six >= 1.6.0
e2cd79ed 35%if %{with tests}
6502ae9a 36BuildRequires: python-backports.unittest_mock >= 1.2
6502ae9a
JB
37BuildRequires: python-pytest >= 3.0.2
38BuildRequires: python-pytest-flake8
e2cd79ed 39%endif
2f649423
MK
40%endif
41%if %{with python3}
724eed28 42BuildRequires: python3-appdirs >= 1.4.0
6502ae9a 43BuildRequires: python3-modules >= 1:3.3
af1d3d4d 44BuildRequires: python3-packaging >= 16.8
929b3f4d 45BuildRequires: python3-six >= 1.6.0
b6cbc91d 46BuildConflicts: python3-distribute < 0.7
e2cd79ed 47%if %{with tests}
6502ae9a
JB
48BuildRequires: python3-pytest >= 3.0.2
49BuildRequires: python3-pytest-flake8
e2cd79ed 50%endif
2f649423 51%endif
5c02125b 52%if %{with apidocs}
be14e546
JP
53BuildRequires: python3-jaraco
54BuildRequires: python3-jaraco.packaging
6502ae9a
JB
55BuildRequires: python3-rst.linker >= 1.6.1
56BuildRequires: sphinx-pdg-3 >= 1.4
5c02125b 57%endif
c034c756 58BuildRequires: rpm-pythonprov
6502ae9a 59BuildRequires: rpmbuild(macros) >= 1.714
6ef7e1f8 60BuildRequires: unzip
c034c756 61Requires: python-modules >= 1:2.6
64c5aa5e 62Obsoletes: python-distribute < 0.7
c034c756 63Obsoletes: python-setuptools-devel
b79e62bc
AM
64BuildArch: noarch
65BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
66
67%description
68setuptools is a collection of enhancements to the Python distutils
c034c756
JB
69that allow you to more easily build and distribute Python 2.x
70packages, especially ones that have dependencies on other packages.
b79e62bc 71
1c17442b 72%description -l pl.UTF-8
d539774b 73setuptools to zestaw rozszerzeń do pythonowych distutils umożliwiający
c034c756
JB
74łatwiejsze budowanie i rozprowadzanie pakietów Pythona 2.x,
75szczególnie tych mających zależności od innych pakietów.
d539774b
JB
76
77Ten pakiet zawiera składniki uruchomieniowe setuptools, potrzebne do
c034c756
JB
78uruchamiania kodu wymagającego pkg_resources.py, przeznaczone dla
79Pythona 2.x.
eadb908c 80
2f649423 81%package -n python3-%{module}
c034c756
JB
82Summary: A collection of enhancements to the Python distutils
83Summary(pl.UTF-8): Zestaw rozszerzeń dla pythonowych distutils
2f649423 84Group: Libraries/Python
6502ae9a 85Requires: python3-modules >= 1:3.3
ff466203 86Obsoletes: python3-distribute < 0.7
2f649423
MK
87
88%description -n python3-%{module}
c034c756
JB
89setuptools is a collection of enhancements to the Python distutils
90that allow you to more easily build and distribute Python 3.x
91packages, especially ones that have dependencies on other packages.
2f649423
MK
92
93%description -n python3-%{module} -l pl.UTF-8
c034c756
JB
94setuptools to zestaw rozszerzeń do pythonowych distutils umożliwiający
95łatwiejsze budowanie i rozprowadzanie pakietów Pythona 3.x,
96szczególnie tych mających zależności od innych pakietów.
2f649423 97
25fb9ea9
JK
98%package -n easy_install
99Summary: Python software installer
100Summary(pl.UTF-8): Instalator oprogramowania napisanego w Pythonie
101Group: Libraries/Python
102%if %{with python3_default}
103Requires: python3-%{module} = %{epoch}:%{version}-%{release}
104%else
105Requires: python-%{module} = %{epoch}:%{version}-%{release}
106%endif
b6cbc91d 107Conflicts: python-setuptools < 1:18.6.1-2
25fb9ea9
JK
108
109%description -n easy_install
110Python software installer.
111
23dd6491 112%description -n easy_install -l pl.UTF-8
25fb9ea9
JK
113Instalator oprogramowania napisanego w Pythonie.
114
2f649423
MK
115%package apidocs
116Summary: %{module} API documentation
117Summary(pl.UTF-8): Dokumentacja API %{module}
118Group: Documentation
119
120%description apidocs
121API documentation for %{module}.
122
123%description apidocs -l pl.UTF-8
124Dokumentacja API %{module}.
125
b79e62bc 126%prep
2f649423 127%setup -q -n %{module}-%{version}
b79e62bc
AM
128
129%build
2f649423 130%if %{with python2}
6502ae9a
JB
131LC_ALL=C.UTF-8 \
132%py_build
133
134%{?with_tests:%{__python} -m pytest pkg_resources/tests setuptools/tests tests}
2f649423
MK
135%endif
136
137%if %{with python3}
6502ae9a
JB
138LC_ALL=C.UTF-8 \
139%py3_build
140
141%{?with_tests:%{__python3} -m pytest pkg_resources/tests setuptools/tests tests}
2f649423 142%endif
b79e62bc 143
c034c756 144%if %{with apidocs}
6502ae9a 145%{__make} -C docs html SPHINXBUILD=sphinx-build-3
c034c756
JB
146%endif
147
b79e62bc
AM
148%install
149rm -rf $RPM_BUILD_ROOT
150
c034c756 151%if %{with python3}
a21b5be7 152%py3_install
2f649423 153%endif
991fba2b 154
c034c756 155%if %{with python2}
a21b5be7 156%py_install
c034c756 157
4ba39be8
JB
158# note: setuptools/command/easy_install.py expects setuptools/site-patch.py to exist
159%py_postclean -x site-patch.py
2f649423 160%endif
b79e62bc 161
25fb9ea9 162%if %{with python3_default}
b6cbc91d 163ln -sf easy_install-%{py3_ver} $RPM_BUILD_ROOT%{_bindir}/easy_install
25fb9ea9 164%else
b6cbc91d 165ln -sf easy_install-%{py_ver} $RPM_BUILD_ROOT%{_bindir}/easy_install
25fb9ea9
JK
166%endif
167
b79e62bc
AM
168%clean
169rm -rf $RPM_BUILD_ROOT
170
2f649423 171%if %{with python2}
b79e62bc
AM
172%files
173%defattr(644,root,root,755)
1ca207b5 174%doc CHANGES.rst README.rst
25fb9ea9 175%attr(755,root,root) %{_bindir}/easy_install-%{py_ver}
5c02125b
JB
176%{py_sitescriptdir}/pkg_resources
177%{py_sitescriptdir}/setuptools
2f649423 178%{py_sitescriptdir}/easy_install.py[co]
2f649423
MK
179%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
180%endif
2f649423
MK
181
182%if %{with python3}
183%files -n python3-%{module}
f4841952 184%defattr(644,root,root,755)
1ca207b5 185%doc CHANGES.rst README.rst
25fb9ea9 186%attr(755,root,root) %{_bindir}/easy_install-%{py3_ver}
c034c756 187%{py3_sitescriptdir}/__pycache__/easy_install.*.py[co]
5c02125b
JB
188%{py3_sitescriptdir}/pkg_resources
189%{py3_sitescriptdir}/setuptools
2f649423 190%{py3_sitescriptdir}/easy_install.py
2f649423
MK
191%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
192%endif
193
25fb9ea9
JK
194%files -n easy_install
195%defattr(644,root,root,755)
196%attr(755,root,root) %{_bindir}/easy_install
197
c034c756 198%if %{with apidocs}
2f649423
MK
199%files apidocs
200%defattr(644,root,root,755)
6502ae9a 201%doc docs/build/html/{_static,*.html,*.js}
2f649423 202%endif
This page took 0.117478 seconds and 4 git commands to generate.