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