]>
Commit | Line | Data |
---|---|---|
2f649423 MK |
1 | # |
2 | # Conditional build: | |
e2cd79ed | 3 | %bcond_without apidocs # Sphinx based documentation |
828f076c | 4 | %bcond_with system_libs # use system modules (appdirs, packaging, pyparsing) # TODO |
6502ae9a | 5 | %bcond_with tests # py.test tests (few failures) |
744badc2 | 6 | %bcond_with bootstrap # convenience alias for without: apidocs,system_libs,tests |
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 |
6a8a63ea | 19 | Version: 54.2.0 |
ad550267 | 20 | Release: 2 |
67093d8e | 21 | Epoch: 1 |
744badc2 | 22 | License: MIT |
b79e62bc | 23 | Group: Development/Languages/Python |
744badc2 | 24 | #Source0Download: https://pypi.org/simple/setuptools/ |
6a8a63ea AM |
25 | Source0: https://files.pythonhosted.org/packages/source/s/setuptools/%{pypi_name}-%{version}.tar.gz |
26 | # Source0-md5: 09f693b5d5ca8bf4fdb1da82f8110a9c | |
828f076c | 27 | Patch0: setuptools-missing.patch |
1ca207b5 | 28 | URL: https://github.com/pypa/setuptools |
744badc2 | 29 | %if %(locale -a | grep -q '^C\.utf8$'; echo $?) |
c034c756 JB |
30 | BuildRequires: glibc-localedb-all |
31 | %endif | |
828f076c | 32 | BuildRequires: python3-modules >= 1:3.6 |
744badc2 JB |
33 | %if %{with system_libs} |
34 | # versions from pkg_resources/_vendor/vendored.txt | |
35 | BuildRequires: python3-appdirs >= 1.4.3 | |
828f076c | 36 | BuildRequires: python3-packaging >= 20.4 |
744badc2 | 37 | BuildRequires: python3-pyparsing >= 2.2.1 |
744badc2 | 38 | %endif |
b6cbc91d | 39 | BuildConflicts: python3-distribute < 0.7 |
e2cd79ed | 40 | %if %{with tests} |
828f076c | 41 | BuildRequires: python3-Sphinx |
744badc2 | 42 | BuildRequires: python3-coverage >= 4.5.1 |
828f076c JB |
43 | BuildRequires: python3-flake8-2020 |
44 | BuildRequires: python3-jaraco.envs | |
45 | BuildRequires: python3-jaraco.path >= 3.2.0 | |
744badc2 JB |
46 | # FIXME: patch to use unittest.mock |
47 | #BuildRequires: python3-mock | |
744badc2 | 48 | BuildRequires: python3-paver |
403a922f | 49 | BuildRequires: python3-pip >= 19.1 |
828f076c JB |
50 | BuildRequires: python3-pytest >= 4.6 |
51 | BuildRequires: python3-pytest-black >= 0.3.7 | |
52 | BuildRequires: python3-pytest-checkdocs >= 2.4 | |
744badc2 | 53 | BuildRequires: python3-pytest-cov >= 2.5.1 |
828f076c | 54 | BuildRequires: python3-pytest-enabler >= 1.0.1 |
6502ae9a | 55 | BuildRequires: python3-pytest-flake8 |
828f076c | 56 | BuildRequires: python3-pytest-mypy |
744badc2 | 57 | BuildRequires: python3-pytest-virtualenv >= 1.2.7 |
828f076c | 58 | BuildRequires: python3-pytest-xdist |
744badc2 JB |
59 | BuildRequires: python3-virtualenv >= 13.0.0 |
60 | BuildRequires: python3-wheel | |
e2cd79ed | 61 | %endif |
5c02125b | 62 | %if %{with apidocs} |
828f076c | 63 | BuildRequires: python3-Sphinx |
be14e546 | 64 | BuildRequires: python3-jaraco |
828f076c | 65 | BuildRequires: python3-jaraco.packaging >= 8.2 |
744badc2 | 66 | BuildRequires: python3-rst.linker >= 1.9 |
828f076c JB |
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 | |
69c5873f | 71 | BuildRequires: python3-wheel |
5c02125b | 72 | %endif |
20a0801e | 73 | %{!?with_bootstrap:BuildRequires: rpm-pythonprov} |
6502ae9a | 74 | BuildRequires: rpmbuild(macros) >= 1.714 |
6ef7e1f8 | 75 | BuildRequires: unzip |
828f076c | 76 | Requires: python3-modules >= 1:3.6 |
744badc2 JB |
77 | %if %{with system_libs} |
78 | # versions from pkg_resources/_vendor/vendored.txt | |
828f076c JB |
79 | Requires: python3-appdirs >= 1.4.3 |
80 | Requires: python3-packaging >= 20.4 | |
81 | Requires: python3-pyparsing >= 2.2.1 | |
744badc2 | 82 | %endif |
b79e62bc AM |
83 | BuildArch: noarch |
84 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
85 | ||
86 | %description | |
87 | setuptools is a collection of enhancements to the Python distutils | |
c034c756 JB |
88 | that allow you to more easily build and distribute Python 2.x |
89 | packages, especially ones that have dependencies on other packages. | |
b79e62bc | 90 | |
1c17442b | 91 | %description -l pl.UTF-8 |
d539774b | 92 | setuptools to zestaw rozszerzeń do pythonowych distutils umożliwiający |
c034c756 JB |
93 | łatwiejsze budowanie i rozprowadzanie pakietów Pythona 2.x, |
94 | szczególnie tych mających zależności od innych pakietów. | |
d539774b JB |
95 | |
96 | Ten pakiet zawiera składniki uruchomieniowe setuptools, potrzebne do | |
c034c756 JB |
97 | uruchamiania kodu wymagającego pkg_resources.py, przeznaczone dla |
98 | Pythona 2.x. | |
eadb908c | 99 | |
2f649423 MK |
100 | %package apidocs |
101 | Summary: %{module} API documentation | |
102 | Summary(pl.UTF-8): Dokumentacja API %{module} | |
103 | Group: Documentation | |
104 | ||
105 | %description apidocs | |
106 | API documentation for %{module}. | |
107 | ||
108 | %description apidocs -l pl.UTF-8 | |
109 | Dokumentacja API %{module}. | |
110 | ||
b79e62bc | 111 | %prep |
2f649423 | 112 | %setup -q -n %{module}-%{version} |
828f076c | 113 | %patch0 -p1 |
b79e62bc | 114 | |
744badc2 JB |
115 | %if %{with system_libs} |
116 | exit 1 # TODO: unvendor modules from pkg_resources/_vendor | |
117 | %endif | |
118 | ||
b79e62bc | 119 | %build |
6502ae9a JB |
120 | LC_ALL=C.UTF-8 \ |
121 | %py3_build | |
122 | ||
123 | %{?with_tests:%{__python3} -m pytest pkg_resources/tests setuptools/tests tests} | |
b79e62bc | 124 | |
c034c756 | 125 | %if %{with apidocs} |
828f076c JB |
126 | cd docs |
127 | %{__python3} -m sphinx -W . build/html | |
c034c756 JB |
128 | %endif |
129 | ||
b79e62bc AM |
130 | %install |
131 | rm -rf $RPM_BUILD_ROOT | |
132 | ||
a21b5be7 | 133 | %py3_install |
991fba2b | 134 | |
b79e62bc AM |
135 | %clean |
136 | rm -rf $RPM_BUILD_ROOT | |
137 | ||
138 | %files | |
139 | %defattr(644,root,root,755) | |
744badc2 | 140 | %doc CHANGES.rst LICENSE README.rst |
6a8a63ea | 141 | %{py3_sitescriptdir}/_distutils_hack |
828f076c | 142 | %{py3_sitescriptdir}/distutils-precedence.pth |
5c02125b JB |
143 | %{py3_sitescriptdir}/pkg_resources |
144 | %{py3_sitescriptdir}/setuptools | |
2f649423 | 145 | %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info |
2f649423 | 146 | |
c034c756 | 147 | %if %{with apidocs} |
2f649423 MK |
148 | %files apidocs |
149 | %defattr(644,root,root,755) | |
828f076c | 150 | %doc docs/build/html/{_static,deprecated,development,references,userguide,*.html,*.js} |
2f649423 | 151 | %endif |