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://files.pythonhosted.org/packages/ef/1d/201c13e353956a1c840f5d0fbf0461bd45bbd678ea4843ebf25924e8984c/setuptools-%{version}.zip
24 # Source0-md5: 592efabea3a65d8e97a025ed52f69b12
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-jaraco
54 BuildRequires: python3-jaraco.packaging
55 BuildRequires: python3-rst.linker >= 1.6.1
56 BuildRequires: sphinx-pdg-3 >= 1.4
58 BuildRequires: rpm-pythonprov
59 BuildRequires: rpmbuild(macros) >= 1.714
61 Requires: python-modules >= 1:2.6
62 Obsoletes: python-distribute < 0.7
63 Obsoletes: python-setuptools-devel
65 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
68 setuptools is a collection of enhancements to the Python distutils
69 that allow you to more easily build and distribute Python 2.x
70 packages, especially ones that have dependencies on other packages.
72 %description -l pl.UTF-8
73 setuptools to zestaw rozszerzeń do pythonowych distutils umożliwiający
74 łatwiejsze budowanie i rozprowadzanie pakietów Pythona 2.x,
75 szczególnie tych mających zależności od innych pakietów.
77 Ten pakiet zawiera składniki uruchomieniowe setuptools, potrzebne do
78 uruchamiania kodu wymagającego pkg_resources.py, przeznaczone dla
81 %package -n python3-%{module}
82 Summary: A collection of enhancements to the Python distutils
83 Summary(pl.UTF-8): Zestaw rozszerzeń dla pythonowych distutils
84 Group: Libraries/Python
85 Requires: python3-modules >= 1:3.3
86 Obsoletes: python3-distribute < 0.7
88 %description -n python3-%{module}
89 setuptools is a collection of enhancements to the Python distutils
90 that allow you to more easily build and distribute Python 3.x
91 packages, especially ones that have dependencies on other packages.
93 %description -n python3-%{module} -l pl.UTF-8
94 setuptools to zestaw rozszerzeń do pythonowych distutils umożliwiający
95 łatwiejsze budowanie i rozprowadzanie pakietów Pythona 3.x,
96 szczególnie tych mających zależności od innych pakietów.
98 %package -n easy_install
99 Summary: Python software installer
100 Summary(pl.UTF-8): Instalator oprogramowania napisanego w Pythonie
101 Group: Libraries/Python
102 %if %{with python3_default}
103 Requires: python3-%{module} = %{epoch}:%{version}-%{release}
105 Requires: python-%{module} = %{epoch}:%{version}-%{release}
107 Conflicts: python-setuptools < 1:18.6.1-2
109 %description -n easy_install
110 Python software installer.
112 %description -n easy_install -l pl.UTF-8
113 Instalator oprogramowania napisanego w Pythonie.
116 Summary: %{module} API documentation
117 Summary(pl.UTF-8): Dokumentacja API %{module}
121 API documentation for %{module}.
123 %description apidocs -l pl.UTF-8
124 Dokumentacja API %{module}.
127 %setup -q -n %{module}-%{version}
134 %{?with_tests:%{__python} -m pytest pkg_resources/tests setuptools/tests tests}
141 %{?with_tests:%{__python3} -m pytest pkg_resources/tests setuptools/tests tests}
145 %{__make} -C docs html SPHINXBUILD=sphinx-build-3
149 rm -rf $RPM_BUILD_ROOT
158 # note: setuptools/command/easy_install.py expects setuptools/site-patch.py to exist
159 %py_postclean -x site-patch.py
162 %if %{with python3_default}
163 ln -sf easy_install-%{py3_ver} $RPM_BUILD_ROOT%{_bindir}/easy_install
165 ln -sf easy_install-%{py_ver} $RPM_BUILD_ROOT%{_bindir}/easy_install
169 rm -rf $RPM_BUILD_ROOT
173 %defattr(644,root,root,755)
174 %doc CHANGES.rst README.rst
175 %attr(755,root,root) %{_bindir}/easy_install-%{py_ver}
176 %{py_sitescriptdir}/pkg_resources
177 %{py_sitescriptdir}/setuptools
178 %{py_sitescriptdir}/easy_install.py[co]
179 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
183 %files -n python3-%{module}
184 %defattr(644,root,root,755)
185 %doc CHANGES.rst README.rst
186 %attr(755,root,root) %{_bindir}/easy_install-%{py3_ver}
187 %{py3_sitescriptdir}/__pycache__/easy_install.*.py[co]
188 %{py3_sitescriptdir}/pkg_resources
189 %{py3_sitescriptdir}/setuptools
190 %{py3_sitescriptdir}/easy_install.py
191 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
194 %files -n easy_install
195 %defattr(644,root,root,755)
196 %attr(755,root,root) %{_bindir}/easy_install
200 %defattr(644,root,root,755)
201 %doc docs/build/html/{_static,*.html,*.js}