3 %bcond_without apidocs # Sphinx based documentation
4 %bcond_with tests # py.test tests (few failures)
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
7 %bcond_without python3_default # Use Python 3.x for easy_install executable
10 %undefine python3_default
13 %define module setuptools
14 Summary: A collection of enhancements to the Python distutils
15 Summary(pl.UTF-8): Zestaw rozszerzeń dla pythonowych distutils
16 Name: python-setuptools
21 Group: Development/Languages/Python
22 #Source0Download: https://pypi.python.org/simple/setuptools/
23 Source0: https://pypi.python.org/packages/d5/b7/e52b7dccd3f91eec858309dcd931c1387bf70b6d458c86a9bfcb50134fbd/setuptools-%{version}.zip
24 # Source0-md5: 696941b10b15f0717be957a4d6cfc12e
25 URL: https://github.com/pypa/setuptools
26 %if %(locale -a | grep -q '^C.UTF-8$'; echo $?)
27 BuildRequires: glibc-localedb-all
30 BuildRequires: python-appdirs >= 1.4.0
31 BuildRequires: python-modules >= 1:2.6
32 BuildRequires: python-packaging >= 16.8
33 BuildConflicts: python-distribute < 0.7
34 BuildRequires: python-six >= 1.6.0
36 BuildRequires: python-backports.unittest_mock >= 1.2
37 BuildRequires: python-pytest >= 3.0.2
38 BuildRequires: python-pytest-flake8
42 BuildRequires: python3-appdirs >= 1.4.0
43 BuildRequires: python3-modules >= 1:3.3
44 BuildRequires: python3-packaging >= 16.8
45 BuildRequires: python3-six >= 1.6.0
46 BuildConflicts: python3-distribute < 0.7
48 BuildRequires: python3-pytest >= 3.0.2
49 BuildRequires: python3-pytest-flake8
53 BuildRequires: python3-rst.linker >= 1.6.1
54 BuildRequires: sphinx-pdg-3 >= 1.4
56 BuildRequires: rpm-pythonprov
57 BuildRequires: rpmbuild(macros) >= 1.714
59 Requires: python-modules >= 1:2.6
60 Obsoletes: python-distribute < 0.7
61 Obsoletes: python-setuptools-devel
63 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
66 setuptools is a collection of enhancements to the Python distutils
67 that allow you to more easily build and distribute Python 2.x
68 packages, especially ones that have dependencies on other packages.
70 %description -l pl.UTF-8
71 setuptools to zestaw rozszerzeń do pythonowych distutils umożliwiający
72 łatwiejsze budowanie i rozprowadzanie pakietów Pythona 2.x,
73 szczególnie tych mających zależności od innych pakietów.
75 Ten pakiet zawiera składniki uruchomieniowe setuptools, potrzebne do
76 uruchamiania kodu wymagającego pkg_resources.py, przeznaczone dla
79 %package -n python3-%{module}
80 Summary: A collection of enhancements to the Python distutils
81 Summary(pl.UTF-8): Zestaw rozszerzeń dla pythonowych distutils
82 Group: Libraries/Python
83 Requires: python3-modules >= 1:3.3
84 Obsoletes: python3-distribute < 0.7
86 %description -n python3-%{module}
87 setuptools is a collection of enhancements to the Python distutils
88 that allow you to more easily build and distribute Python 3.x
89 packages, especially ones that have dependencies on other packages.
91 %description -n python3-%{module} -l pl.UTF-8
92 setuptools to zestaw rozszerzeń do pythonowych distutils umożliwiający
93 łatwiejsze budowanie i rozprowadzanie pakietów Pythona 3.x,
94 szczególnie tych mających zależności od innych pakietów.
96 %package -n easy_install
97 Summary: Python software installer
98 Summary(pl.UTF-8): Instalator oprogramowania napisanego w Pythonie
99 Group: Libraries/Python
100 %if %{with python3_default}
101 Requires: python3-%{module} = %{epoch}:%{version}-%{release}
103 Requires: python-%{module} = %{epoch}:%{version}-%{release}
105 Conflicts: python-setuptools < 1:18.6.1-2
107 %description -n easy_install
108 Python software installer.
110 %description -n easy_install -l pl.UTF-8
111 Instalator oprogramowania napisanego w Pythonie.
114 Summary: %{module} API documentation
115 Summary(pl.UTF-8): Dokumentacja API %{module}
119 API documentation for %{module}.
121 %description apidocs -l pl.UTF-8
122 Dokumentacja API %{module}.
125 %setup -q -n %{module}-%{version}
132 %{?with_tests:%{__python} -m pytest pkg_resources/tests setuptools/tests tests}
139 %{?with_tests:%{__python3} -m pytest pkg_resources/tests setuptools/tests tests}
143 %{__make} -C docs html SPHINXBUILD=sphinx-build-3
147 rm -rf $RPM_BUILD_ROOT
156 # note: setuptools/command/easy_install.py expects setuptools/site-patch.py to exist
157 %py_postclean -x site-patch.py
160 %if %{with python3_default}
161 ln -sf easy_install-%{py3_ver} $RPM_BUILD_ROOT%{_bindir}/easy_install
163 ln -sf easy_install-%{py_ver} $RPM_BUILD_ROOT%{_bindir}/easy_install
167 rm -rf $RPM_BUILD_ROOT
171 %defattr(644,root,root,755)
172 %doc CHANGES.rst README.rst
173 %attr(755,root,root) %{_bindir}/easy_install-%{py_ver}
174 %{py_sitescriptdir}/pkg_resources
175 %{py_sitescriptdir}/setuptools
176 %{py_sitescriptdir}/easy_install.py[co]
177 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
181 %files -n python3-%{module}
182 %defattr(644,root,root,755)
183 %doc CHANGES.rst README.rst
184 %attr(755,root,root) %{_bindir}/easy_install-%{py3_ver}
185 %{py3_sitescriptdir}/__pycache__/easy_install.*.py[co]
186 %{py3_sitescriptdir}/pkg_resources
187 %{py3_sitescriptdir}/setuptools
188 %{py3_sitescriptdir}/easy_install.py
189 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
192 %files -n easy_install
193 %defattr(644,root,root,755)
194 %attr(755,root,root) %{_bindir}/easy_install
198 %defattr(644,root,root,755)
199 %doc docs/build/html/{_static,*.html,*.js}