]> git.pld-linux.org Git - packages/python3-setuptools.git/blame - python-setuptools.spec
six is always build-required
[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
6502ae9a 17Version: 34.3.3
505e497f 18Release: 3
67093d8e 19Epoch: 1
2f649423 20License: PSF or ZPL
b79e62bc 21Group: Development/Languages/Python
e2cd79ed 22#Source0Download: https://pypi.python.org/simple/setuptools/
6502ae9a
JB
23Source0: https://pypi.python.org/packages/d5/b7/e52b7dccd3f91eec858309dcd931c1387bf70b6d458c86a9bfcb50134fbd/setuptools-%{version}.zip
24# Source0-md5: 696941b10b15f0717be957a4d6cfc12e
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}
6502ae9a
JB
53BuildRequires: python3-rst.linker >= 1.6.1
54BuildRequires: sphinx-pdg-3 >= 1.4
5c02125b 55%endif
c034c756 56BuildRequires: rpm-pythonprov
6502ae9a 57BuildRequires: rpmbuild(macros) >= 1.714
6ef7e1f8 58BuildRequires: unzip
c034c756 59Requires: python-modules >= 1:2.6
64c5aa5e 60Obsoletes: python-distribute < 0.7
c034c756 61Obsoletes: python-setuptools-devel
b79e62bc
AM
62BuildArch: noarch
63BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
64
65%description
66setuptools is a collection of enhancements to the Python distutils
c034c756
JB
67that allow you to more easily build and distribute Python 2.x
68packages, especially ones that have dependencies on other packages.
b79e62bc 69
1c17442b 70%description -l pl.UTF-8
d539774b 71setuptools to zestaw rozszerzeń do pythonowych distutils umożliwiający
c034c756
JB
72łatwiejsze budowanie i rozprowadzanie pakietów Pythona 2.x,
73szczególnie tych mających zależności od innych pakietów.
d539774b
JB
74
75Ten pakiet zawiera składniki uruchomieniowe setuptools, potrzebne do
c034c756
JB
76uruchamiania kodu wymagającego pkg_resources.py, przeznaczone dla
77Pythona 2.x.
eadb908c 78
2f649423 79%package -n python3-%{module}
c034c756
JB
80Summary: A collection of enhancements to the Python distutils
81Summary(pl.UTF-8): Zestaw rozszerzeń dla pythonowych distutils
2f649423 82Group: Libraries/Python
6502ae9a 83Requires: python3-modules >= 1:3.3
ff466203 84Obsoletes: python3-distribute < 0.7
2f649423
MK
85
86%description -n python3-%{module}
c034c756
JB
87setuptools is a collection of enhancements to the Python distutils
88that allow you to more easily build and distribute Python 3.x
89packages, especially ones that have dependencies on other packages.
2f649423
MK
90
91%description -n python3-%{module} -l pl.UTF-8
c034c756
JB
92setuptools to zestaw rozszerzeń do pythonowych distutils umożliwiający
93łatwiejsze budowanie i rozprowadzanie pakietów Pythona 3.x,
94szczególnie tych mających zależności od innych pakietów.
2f649423 95
25fb9ea9
JK
96%package -n easy_install
97Summary: Python software installer
98Summary(pl.UTF-8): Instalator oprogramowania napisanego w Pythonie
99Group: Libraries/Python
100%if %{with python3_default}
101Requires: python3-%{module} = %{epoch}:%{version}-%{release}
102%else
103Requires: python-%{module} = %{epoch}:%{version}-%{release}
104%endif
b6cbc91d 105Conflicts: python-setuptools < 1:18.6.1-2
25fb9ea9
JK
106
107%description -n easy_install
108Python software installer.
109
23dd6491 110%description -n easy_install -l pl.UTF-8
25fb9ea9
JK
111Instalator oprogramowania napisanego w Pythonie.
112
2f649423
MK
113%package apidocs
114Summary: %{module} API documentation
115Summary(pl.UTF-8): Dokumentacja API %{module}
116Group: Documentation
117
118%description apidocs
119API documentation for %{module}.
120
121%description apidocs -l pl.UTF-8
122Dokumentacja API %{module}.
123
b79e62bc 124%prep
2f649423 125%setup -q -n %{module}-%{version}
b79e62bc
AM
126
127%build
2f649423 128%if %{with python2}
6502ae9a
JB
129LC_ALL=C.UTF-8 \
130%py_build
131
132%{?with_tests:%{__python} -m pytest pkg_resources/tests setuptools/tests tests}
2f649423
MK
133%endif
134
135%if %{with python3}
6502ae9a
JB
136LC_ALL=C.UTF-8 \
137%py3_build
138
139%{?with_tests:%{__python3} -m pytest pkg_resources/tests setuptools/tests tests}
2f649423 140%endif
b79e62bc 141
c034c756 142%if %{with apidocs}
6502ae9a 143%{__make} -C docs html SPHINXBUILD=sphinx-build-3
c034c756
JB
144%endif
145
b79e62bc
AM
146%install
147rm -rf $RPM_BUILD_ROOT
148
c034c756 149%if %{with python3}
a21b5be7 150%py3_install
2f649423 151%endif
991fba2b 152
c034c756 153%if %{with python2}
a21b5be7 154%py_install
c034c756 155
4ba39be8
JB
156# note: setuptools/command/easy_install.py expects setuptools/site-patch.py to exist
157%py_postclean -x site-patch.py
2f649423 158%endif
b79e62bc 159
25fb9ea9 160%if %{with python3_default}
b6cbc91d 161ln -sf easy_install-%{py3_ver} $RPM_BUILD_ROOT%{_bindir}/easy_install
25fb9ea9 162%else
b6cbc91d 163ln -sf easy_install-%{py_ver} $RPM_BUILD_ROOT%{_bindir}/easy_install
25fb9ea9
JK
164%endif
165
b79e62bc
AM
166%clean
167rm -rf $RPM_BUILD_ROOT
168
2f649423 169%if %{with python2}
b79e62bc
AM
170%files
171%defattr(644,root,root,755)
1ca207b5 172%doc CHANGES.rst README.rst
25fb9ea9 173%attr(755,root,root) %{_bindir}/easy_install-%{py_ver}
5c02125b
JB
174%{py_sitescriptdir}/pkg_resources
175%{py_sitescriptdir}/setuptools
2f649423 176%{py_sitescriptdir}/easy_install.py[co]
2f649423
MK
177%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
178%endif
2f649423
MK
179
180%if %{with python3}
181%files -n python3-%{module}
f4841952 182%defattr(644,root,root,755)
1ca207b5 183%doc CHANGES.rst README.rst
25fb9ea9 184%attr(755,root,root) %{_bindir}/easy_install-%{py3_ver}
c034c756 185%{py3_sitescriptdir}/__pycache__/easy_install.*.py[co]
5c02125b
JB
186%{py3_sitescriptdir}/pkg_resources
187%{py3_sitescriptdir}/setuptools
2f649423 188%{py3_sitescriptdir}/easy_install.py
2f649423
MK
189%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
190%endif
191
25fb9ea9
JK
192%files -n easy_install
193%defattr(644,root,root,755)
194%attr(755,root,root) %{_bindir}/easy_install
195
c034c756 196%if %{with apidocs}
2f649423
MK
197%files apidocs
198%defattr(644,root,root,755)
6502ae9a 199%doc docs/build/html/{_static,*.html,*.js}
2f649423 200%endif
This page took 0.129757 seconds and 4 git commands to generate.