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 %define pypi_name setuptools
15 Summary: A collection of enhancements to the Python distutils
16 Summary(pl.UTF-8): Zestaw rozszerzeń dla pythonowych distutils
17 Name: python-setuptools
22 Group: Development/Languages/Python
23 #Source0Download: https://pypi.python.org/simple/setuptools/
24 Source0: https://files.pythonhosted.org/packages/source/s/%{pypi_name}/%{pypi_name}-%{version}.zip
25 # Source0-md5: 592efabea3a65d8e97a025ed52f69b12
26 URL: https://github.com/pypa/setuptools
27 %if %(locale -a | grep -q '^C.UTF-8$'; echo $?)
28 BuildRequires: glibc-localedb-all
31 BuildRequires: python-appdirs >= 1.4.0
32 BuildRequires: python-modules >= 1:2.6
33 BuildRequires: python-packaging >= 16.8
34 BuildConflicts: python-distribute < 0.7
35 BuildRequires: python-six >= 1.6.0
37 BuildRequires: python-backports.unittest_mock >= 1.2
38 BuildRequires: python-pytest >= 3.0.2
39 BuildRequires: python-pytest-flake8
43 BuildRequires: python3-appdirs >= 1.4.0
44 BuildRequires: python3-modules >= 1:3.3
45 BuildRequires: python3-packaging >= 16.8
46 BuildRequires: python3-six >= 1.6.0
47 BuildConflicts: python3-distribute < 0.7
49 BuildRequires: python3-pytest >= 3.0.2
50 BuildRequires: python3-pytest-flake8
54 BuildRequires: python3-jaraco
55 BuildRequires: python3-jaraco.packaging
56 BuildRequires: python3-rst.linker >= 1.6.1
57 BuildRequires: sphinx-pdg-3 >= 1.4
59 BuildRequires: rpm-pythonprov
60 BuildRequires: rpmbuild(macros) >= 1.714
62 Requires: python-modules >= 1:2.6
63 Obsoletes: python-distribute < 0.7
64 Obsoletes: python-setuptools-devel
66 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
69 setuptools is a collection of enhancements to the Python distutils
70 that allow you to more easily build and distribute Python 2.x
71 packages, especially ones that have dependencies on other packages.
73 %description -l pl.UTF-8
74 setuptools to zestaw rozszerzeń do pythonowych distutils umożliwiający
75 łatwiejsze budowanie i rozprowadzanie pakietów Pythona 2.x,
76 szczególnie tych mających zależności od innych pakietów.
78 Ten pakiet zawiera składniki uruchomieniowe setuptools, potrzebne do
79 uruchamiania kodu wymagającego pkg_resources.py, przeznaczone dla
82 %package -n python3-%{module}
83 Summary: A collection of enhancements to the Python distutils
84 Summary(pl.UTF-8): Zestaw rozszerzeń dla pythonowych distutils
85 Group: Libraries/Python
86 Requires: python3-modules >= 1:3.3
87 Obsoletes: python3-distribute < 0.7
89 %description -n python3-%{module}
90 setuptools is a collection of enhancements to the Python distutils
91 that allow you to more easily build and distribute Python 3.x
92 packages, especially ones that have dependencies on other packages.
94 %description -n python3-%{module} -l pl.UTF-8
95 setuptools to zestaw rozszerzeń do pythonowych distutils umożliwiający
96 łatwiejsze budowanie i rozprowadzanie pakietów Pythona 3.x,
97 szczególnie tych mających zależności od innych pakietów.
99 %package -n easy_install
100 Summary: Python software installer
101 Summary(pl.UTF-8): Instalator oprogramowania napisanego w Pythonie
102 Group: Libraries/Python
103 %if %{with python3_default}
104 Requires: python3-%{module} = %{epoch}:%{version}-%{release}
106 Requires: python-%{module} = %{epoch}:%{version}-%{release}
108 Conflicts: python-setuptools < 1:18.6.1-2
110 %description -n easy_install
111 Python software installer.
113 %description -n easy_install -l pl.UTF-8
114 Instalator oprogramowania napisanego w Pythonie.
117 Summary: %{module} API documentation
118 Summary(pl.UTF-8): Dokumentacja API %{module}
122 API documentation for %{module}.
124 %description apidocs -l pl.UTF-8
125 Dokumentacja API %{module}.
128 %setup -q -n %{module}-%{version}
135 %{?with_tests:%{__python} -m pytest pkg_resources/tests setuptools/tests tests}
142 %{?with_tests:%{__python3} -m pytest pkg_resources/tests setuptools/tests tests}
146 %{__make} -C docs html SPHINXBUILD=sphinx-build-3
150 rm -rf $RPM_BUILD_ROOT
159 # note: setuptools/command/easy_install.py expects setuptools/site-patch.py to exist
160 %py_postclean -x site-patch.py
163 %if %{with python3_default}
164 ln -sf easy_install-%{py3_ver} $RPM_BUILD_ROOT%{_bindir}/easy_install
166 ln -sf easy_install-%{py_ver} $RPM_BUILD_ROOT%{_bindir}/easy_install
170 rm -rf $RPM_BUILD_ROOT
174 %defattr(644,root,root,755)
175 %doc CHANGES.rst README.rst
176 %attr(755,root,root) %{_bindir}/easy_install-%{py_ver}
177 %{py_sitescriptdir}/pkg_resources
178 %{py_sitescriptdir}/setuptools
179 %{py_sitescriptdir}/easy_install.py[co]
180 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
184 %files -n python3-%{module}
185 %defattr(644,root,root,755)
186 %doc CHANGES.rst README.rst
187 %attr(755,root,root) %{_bindir}/easy_install-%{py3_ver}
188 %{py3_sitescriptdir}/__pycache__/easy_install.*.py[co]
189 %{py3_sitescriptdir}/pkg_resources
190 %{py3_sitescriptdir}/setuptools
191 %{py3_sitescriptdir}/easy_install.py
192 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
195 %files -n easy_install
196 %defattr(644,root,root,755)
197 %attr(755,root,root) %{_bindir}/easy_install
201 %defattr(644,root,root,755)
202 %doc docs/build/html/{_static,*.html,*.js}