]>
Commit | Line | Data |
---|---|---|
2f649423 MK |
1 | # |
2 | # Conditional build: | |
300f73bb | 3 | %bcond_with apidocs # Sphinx based documentation |
dbaf506a | 4 | %bcond_with system_libs # use system modules (appdirs, jaraco.text, packaging...) # TODO |
6502ae9a | 5 | %bcond_with tests # py.test tests (few failures) |
2f5fae83 | 6 | %bcond_with bootstrap # no system modules, bootstrap egg-info without system setuptools |
25fb9ea9 | 7 | |
744badc2 JB |
8 | %if %{with bootstrap} |
9 | %undefine with_apidocs | |
10 | %undefine with_system_libs | |
11 | %undefine with_tests | |
12 | %endif | |
2f649423 | 13 | |
744badc2 | 14 | %define module setuptools |
9fded6eb | 15 | %define pypi_name setuptools |
b79e62bc | 16 | Summary: A collection of enhancements to the Python distutils |
e4a6c4e2 | 17 | Summary(pl.UTF-8): Zestaw rozszerzeń dla pythonowych distutils |
34676580 | 18 | Name: python3-setuptools |
dbaf506a | 19 | Version: 69.2.0 |
2f5fae83 | 20 | Release: 1 |
67093d8e | 21 | Epoch: 1 |
744badc2 | 22 | License: MIT |
b79e62bc | 23 | Group: Development/Languages/Python |
744badc2 | 24 | #Source0Download: https://pypi.org/simple/setuptools/ |
dbaf506a JB |
25 | Source0: https://files.pythonhosted.org/packages/source/s/setuptools/%{pypi_name}-%{version}.tar.gz |
26 | # Source0-md5: 940ffdb3a2ce4f6a5ee80032aa115fc7 | |
828f076c | 27 | Patch0: setuptools-missing.patch |
80225079 | 28 | Patch1: multilib.patch |
1ca207b5 | 29 | URL: https://github.com/pypa/setuptools |
744badc2 | 30 | %if %(locale -a | grep -q '^C\.utf8$'; echo $?) |
c034c756 JB |
31 | BuildRequires: glibc-localedb-all |
32 | %endif | |
9195227e | 33 | BuildRequires: python3-modules >= 1:3.8 |
2f5fae83 | 34 | %{!?with_bootstrap:BuildRequires: python3-setuptools >= 1:54} |
744badc2 | 35 | %if %{with system_libs} |
2f5fae83 | 36 | # versions from pkg_resources/_vendor/vendored.txt and setuptools/_vendor/vendored.txt |
dbaf506a JB |
37 | BuildRequires: python3-importlib_metadata >= 6.0.0 |
38 | BuildRequires: python3-importlib_resources >= 5.10.2 | |
2f5fae83 JB |
39 | BuildRequires: python3-jaraco.text >= 3.7.0 |
40 | BuildRequires: python3-ordered-set >= 3.1.1 | |
dbaf506a | 41 | BuildRequires: python3-platformdirs >= 2.6.2 |
2f5fae83 | 42 | BuildRequires: python3-more_itertools >= 8.8.0 |
dbaf506a | 43 | BuildRequires: python3-packaging >= 23.1 |
2f5fae83 | 44 | BuildRequires: python3-tomli >= 2.0.1 |
dbaf506a | 45 | BuildRequires: python3-typing_extensions >= 4.4.0 |
2f5fae83 | 46 | BuildRequires: python3-zipp >= 3.7.0 |
744badc2 | 47 | %endif |
b6cbc91d | 48 | BuildConflicts: python3-distribute < 0.7 |
e2cd79ed | 49 | %if %{with tests} |
2f5fae83 | 50 | BuildRequires: python3-build |
744badc2 | 51 | BuildRequires: python3-coverage >= 4.5.1 |
2f5fae83 | 52 | BuildRequires: python3-filelock >= 3.4.0 |
dbaf506a | 53 | BuildRequires: python3-importlib_metadata |
2f5fae83 | 54 | BuildRequires: python3-ini2toml >= 0.9 |
dbaf506a | 55 | BuildRequires: python3-jaraco.develop >= 7.21 |
2f5fae83 | 56 | BuildRequires: python3-jaraco.envs >= 2.2 |
828f076c | 57 | BuildRequires: python3-jaraco.path >= 3.2.0 |
dbaf506a JB |
58 | BuildRequires: python3-mypy >= 1.9 |
59 | BuildRequires: python3-packaging >= 23.2 | |
403a922f | 60 | BuildRequires: python3-pip >= 19.1 |
2f5fae83 JB |
61 | BuildRequires: python3-pip_run >= 8.8 |
62 | BuildRequires: python3-pytest >= 6 | |
828f076c | 63 | BuildRequires: python3-pytest-checkdocs >= 2.4 |
744badc2 | 64 | BuildRequires: python3-pytest-cov >= 2.5.1 |
dbaf506a JB |
65 | BuildRequires: python3-pytest-enabler >= 2.2 |
66 | BuildRequires: python3-pytest-home | |
2f5fae83 JB |
67 | BuildRequires: python3-pytest-mypy >= 0.9.1 |
68 | BuildRequires: python3-pytest-perf | |
dbaf506a JB |
69 | BuildRequires: python3-pytest-ruff >= 0.2.1 |
70 | BuildRequires: python3-pytest-timeout | |
71 | BuildRequires: python3-pytest-xdist >= 3 | |
744badc2 | 72 | BuildRequires: python3-virtualenv >= 13.0.0 |
2f5fae83 JB |
73 | BuildRequires: python3-tomli |
74 | BuildRequires: python3-tomli-w >= 1.0.0 | |
744badc2 | 75 | BuildRequires: python3-wheel |
e2cd79ed | 76 | %endif |
5c02125b | 77 | %if %{with apidocs} |
dbaf506a JB |
78 | BuildRequires: python3-Sphinx >= 3.5 |
79 | BuildRequires: python3-Sphinx < 7.2.5 | |
a57a3e11 | 80 | BuildRequires: python3-furo |
be14e546 | 81 | BuildRequires: python3-jaraco |
dbaf506a | 82 | BuildRequires: python3-jaraco.packaging >= 9.3 |
2f5fae83 JB |
83 | BuildRequires: python3-jaraco.tidelift >= 1.4 |
84 | BuildRequires: python3-pygments-github-lexers >= 0.0.5 | |
744badc2 | 85 | BuildRequires: python3-rst.linker >= 1.9 |
828f076c JB |
86 | # specified but not required(?) |
87 | #BuildRequires: python3-pygments-github-lexers >= 0.0.5 | |
88 | BuildRequires: python3-setuptools >= 1:34 | |
2f5fae83 | 89 | BuildRequires: python3-sphinx-hoverxref |
dbaf506a JB |
90 | BuildRequires: python3-sphinx-notfound-page >= 1 |
91 | BuildRequires: python3-sphinx-notfound-page < 2 | |
2f5fae83 | 92 | BuildRequires: python3-sphinx-reredirects |
a57a3e11 | 93 | BuildRequires: python3-sphinx_favicon |
828f076c | 94 | BuildRequires: python3-sphinx_inline_tabs |
a57a3e11 | 95 | BuildRequires: python3-sphinxcontrib-towncrier |
dbaf506a | 96 | BuildRequires: python3-tomli |
5c02125b | 97 | %endif |
20a0801e | 98 | %{!?with_bootstrap:BuildRequires: rpm-pythonprov} |
6502ae9a | 99 | BuildRequires: rpmbuild(macros) >= 1.714 |
6ef7e1f8 | 100 | BuildRequires: unzip |
9195227e | 101 | Requires: python3-modules >= 1:3.8 |
744badc2 | 102 | %if %{with system_libs} |
2f5fae83 | 103 | # versions from pkg_resources/_vendor/vendored.txt and setuptools/_vendor/vendored.txt |
dbaf506a JB |
104 | Requires: python3-importlib_metadata >= 6.0.0 |
105 | Requires: python3-importlib_resources >= 5.10.2 | |
2f5fae83 JB |
106 | Requires: python3-jaraco.text >= 3.7.0 |
107 | Requires: python3-ordered-set >= 3.1.1 | |
dbaf506a | 108 | Requires: python3-platformdirs >= 2.6.2 |
2f5fae83 | 109 | Requires: python3-more_itertools >= 8.8.0 |
dbaf506a | 110 | Requires: python3-packaging >= 23.1 |
2f5fae83 | 111 | Requires: python3-tomli >= 2.0.1 |
dbaf506a | 112 | Requires: python3-typing_extensions >= 4.4.0 |
2f5fae83 | 113 | Requires: python3-zipp >= 3.7.0 |
744badc2 | 114 | %endif |
b79e62bc AM |
115 | BuildArch: noarch |
116 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
117 | ||
118 | %description | |
119 | setuptools is a collection of enhancements to the Python distutils | |
c034c756 JB |
120 | that allow you to more easily build and distribute Python 2.x |
121 | packages, especially ones that have dependencies on other packages. | |
b79e62bc | 122 | |
1c17442b | 123 | %description -l pl.UTF-8 |
d539774b | 124 | setuptools to zestaw rozszerzeń do pythonowych distutils umożliwiający |
c034c756 JB |
125 | łatwiejsze budowanie i rozprowadzanie pakietów Pythona 2.x, |
126 | szczególnie tych mających zależności od innych pakietów. | |
d539774b JB |
127 | |
128 | Ten pakiet zawiera składniki uruchomieniowe setuptools, potrzebne do | |
c034c756 JB |
129 | uruchamiania kodu wymagającego pkg_resources.py, przeznaczone dla |
130 | Pythona 2.x. | |
eadb908c | 131 | |
2f649423 MK |
132 | %package apidocs |
133 | Summary: %{module} API documentation | |
134 | Summary(pl.UTF-8): Dokumentacja API %{module} | |
135 | Group: Documentation | |
136 | ||
137 | %description apidocs | |
138 | API documentation for %{module}. | |
139 | ||
140 | %description apidocs -l pl.UTF-8 | |
141 | Dokumentacja API %{module}. | |
142 | ||
b79e62bc | 143 | %prep |
2f649423 | 144 | %setup -q -n %{module}-%{version} |
828f076c | 145 | %patch0 -p1 |
80225079 | 146 | %patch1 -p1 |
b79e62bc | 147 | |
744badc2 JB |
148 | %if %{with system_libs} |
149 | exit 1 # TODO: unvendor modules from pkg_resources/_vendor | |
150 | %endif | |
151 | ||
b79e62bc | 152 | %build |
2f5fae83 JB |
153 | %if %{with bootstrap} |
154 | %{__python3} setup.py egg_info | |
155 | %endif | |
156 | ||
6502ae9a JB |
157 | LC_ALL=C.UTF-8 \ |
158 | %py3_build | |
159 | ||
160 | %{?with_tests:%{__python3} -m pytest pkg_resources/tests setuptools/tests tests} | |
b79e62bc | 161 | |
c034c756 | 162 | %if %{with apidocs} |
828f076c JB |
163 | cd docs |
164 | %{__python3} -m sphinx -W . build/html | |
c034c756 JB |
165 | %endif |
166 | ||
b79e62bc AM |
167 | %install |
168 | rm -rf $RPM_BUILD_ROOT | |
169 | ||
a21b5be7 | 170 | %py3_install |
991fba2b | 171 | |
9195227e AM |
172 | #??? |
173 | rm -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/build-3/ | |
174 | ||
b79e62bc AM |
175 | %clean |
176 | rm -rf $RPM_BUILD_ROOT | |
177 | ||
178 | %files | |
179 | %defattr(644,root,root,755) | |
9195227e | 180 | %doc LICENSE NEWS.rst README.rst |
6a8a63ea | 181 | %{py3_sitescriptdir}/_distutils_hack |
828f076c | 182 | %{py3_sitescriptdir}/distutils-precedence.pth |
5c02125b JB |
183 | %{py3_sitescriptdir}/pkg_resources |
184 | %{py3_sitescriptdir}/setuptools | |
a57a3e11 | 185 | %{py3_sitescriptdir}/%{module}-%{version}*py*.egg-info |
2f649423 | 186 | |
c034c756 | 187 | %if %{with apidocs} |
2f649423 MK |
188 | %files apidocs |
189 | %defattr(644,root,root,755) | |
828f076c | 190 | %doc docs/build/html/{_static,deprecated,development,references,userguide,*.html,*.js} |
2f649423 | 191 | %endif |