3 %bcond_without apidocs # Sphinx based documentation
4 %bcond_with system_libs # use system modules (appdirs, packaging, pyparsing) # TODO
5 %bcond_with tests # py.test tests (few failures)
6 %bcond_with bootstrap # convenience alias for without: apidocs,system_libs,tests
10 %undefine with_system_libs
14 %define module setuptools
15 %define pypi_name setuptools
16 Summary: A collection of enhancements to the Python distutils
17 Summary(pl.UTF-8): Zestaw rozszerzeń dla pythonowych distutils
18 Name: python3-setuptools
23 Group: Development/Languages/Python
24 #Source0Download: https://pypi.org/simple/setuptools/
25 Source0: https://files.pythonhosted.org/packages/source/s/setuptools/%{pypi_name}-%{version}.tar.gz
26 # Source0-md5: 09f693b5d5ca8bf4fdb1da82f8110a9c
27 Patch0: setuptools-missing.patch
28 URL: https://github.com/pypa/setuptools
29 %if %(locale -a | grep -q '^C\.utf8$'; echo $?)
30 BuildRequires: glibc-localedb-all
32 BuildRequires: python3-modules >= 1:3.6
33 %if %{with system_libs}
34 # versions from pkg_resources/_vendor/vendored.txt
35 BuildRequires: python3-appdirs >= 1.4.3
36 BuildRequires: python3-packaging >= 20.4
37 BuildRequires: python3-pyparsing >= 2.2.1
39 BuildConflicts: python3-distribute < 0.7
41 BuildRequires: python3-Sphinx
42 BuildRequires: python3-coverage >= 4.5.1
43 BuildRequires: python3-flake8-2020
44 BuildRequires: python3-jaraco.envs
45 BuildRequires: python3-jaraco.path >= 3.2.0
46 # FIXME: patch to use unittest.mock
47 #BuildRequires: python3-mock
48 BuildRequires: python3-paver
49 BuildRequires: python3-pip >= 19.1
50 BuildRequires: python3-pytest >= 4.6
51 BuildRequires: python3-pytest-black >= 0.3.7
52 BuildRequires: python3-pytest-checkdocs >= 2.4
53 BuildRequires: python3-pytest-cov >= 2.5.1
54 BuildRequires: python3-pytest-enabler >= 1.0.1
55 BuildRequires: python3-pytest-flake8
56 BuildRequires: python3-pytest-mypy
57 BuildRequires: python3-pytest-virtualenv >= 1.2.7
58 BuildRequires: python3-pytest-xdist
59 BuildRequires: python3-virtualenv >= 13.0.0
60 BuildRequires: python3-wheel
63 BuildRequires: python3-Sphinx
64 BuildRequires: python3-jaraco
65 BuildRequires: python3-jaraco.packaging >= 8.2
66 BuildRequires: python3-rst.linker >= 1.9
67 # specified but not required(?)
68 #BuildRequires: python3-pygments-github-lexers >= 0.0.5
69 BuildRequires: python3-setuptools >= 1:34
70 BuildRequires: python3-sphinx_inline_tabs
72 %{?with_bootstrap:BuildRequires: rpm-pythonprov}
73 BuildRequires: rpmbuild(macros) >= 1.714
75 Requires: python3-modules >= 1:3.6
76 %if %{with system_libs}
77 # versions from pkg_resources/_vendor/vendored.txt
78 Requires: python3-appdirs >= 1.4.3
79 Requires: python3-packaging >= 20.4
80 Requires: python3-pyparsing >= 2.2.1
83 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
86 setuptools is a collection of enhancements to the Python distutils
87 that allow you to more easily build and distribute Python 2.x
88 packages, especially ones that have dependencies on other packages.
90 %description -l pl.UTF-8
91 setuptools to zestaw rozszerzeń do pythonowych distutils umożliwiający
92 łatwiejsze budowanie i rozprowadzanie pakietów Pythona 2.x,
93 szczególnie tych mających zależności od innych pakietów.
95 Ten pakiet zawiera składniki uruchomieniowe setuptools, potrzebne do
96 uruchamiania kodu wymagającego pkg_resources.py, przeznaczone dla
100 Summary: %{module} API documentation
101 Summary(pl.UTF-8): Dokumentacja API %{module}
105 API documentation for %{module}.
107 %description apidocs -l pl.UTF-8
108 Dokumentacja API %{module}.
111 %setup -q -n %{module}-%{version}
114 %if %{with system_libs}
115 exit 1 # TODO: unvendor modules from pkg_resources/_vendor
122 %{?with_tests:%{__python3} -m pytest pkg_resources/tests setuptools/tests tests}
126 %{__python3} -m sphinx -W . build/html
130 rm -rf $RPM_BUILD_ROOT
135 rm -rf $RPM_BUILD_ROOT
138 %defattr(644,root,root,755)
139 %doc CHANGES.rst LICENSE README.rst
140 %{py3_sitescriptdir}/_distutils_hack
141 %{py3_sitescriptdir}/distutils-precedence.pth
142 %{py3_sitescriptdir}/pkg_resources
143 %{py3_sitescriptdir}/setuptools
144 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
148 %defattr(644,root,root,755)
149 %doc docs/build/html/{_static,deprecated,development,references,userguide,*.html,*.js}