]>
Commit | Line | Data |
---|---|---|
2f649423 MK |
1 | # |
2 | # Conditional build: | |
e2cd79ed | 3 | %bcond_without apidocs # Sphinx based documentation |
744badc2 | 4 | %bcond_with system_libs # use system modules (appdirs, packaging, pyparsing, six) # 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 |
403a922f | 19 | Version: 42.0.2 |
b43a791c | 20 | Release: 5 |
67093d8e | 21 | Epoch: 1 |
744badc2 | 22 | License: MIT |
b79e62bc | 23 | Group: Development/Languages/Python |
744badc2 JB |
24 | #Source0Download: https://pypi.org/simple/setuptools/ |
25 | Source0: https://files.pythonhosted.org/packages/source/s/setuptools/%{pypi_name}-%{version}.zip | |
403a922f | 26 | # Source0-md5: 5ac69b66a6f7d4785517017f37df28e9 |
1ca207b5 | 27 | URL: https://github.com/pypa/setuptools |
744badc2 | 28 | %if %(locale -a | grep -q '^C\.utf8$'; echo $?) |
c034c756 JB |
29 | BuildRequires: glibc-localedb-all |
30 | %endif | |
744badc2 JB |
31 | BuildRequires: python3-modules >= 1:3.4 |
32 | %if %{with system_libs} | |
33 | # versions from pkg_resources/_vendor/vendored.txt | |
34 | BuildRequires: python3-appdirs >= 1.4.3 | |
403a922f | 35 | BuildRequires: python3-packaging >= 19.2 |
744badc2 JB |
36 | BuildRequires: python3-pyparsing >= 2.2.1 |
37 | BuildRequires: python3-six >= 1.10.0 | |
38 | %endif | |
b6cbc91d | 39 | BuildConflicts: python3-distribute < 0.7 |
e2cd79ed | 40 | %if %{with tests} |
744badc2 JB |
41 | BuildRequires: python3-coverage >= 4.5.1 |
42 | # FIXME: patch to use unittest.mock | |
43 | #BuildRequires: python3-mock | |
44 | %if "%{py3_ver}" >= "3.6" | |
45 | BuildRequires: python3-paver | |
46 | %endif | |
403a922f | 47 | BuildRequires: python3-pip >= 19.1 |
ac973a26 | 48 | BuildRequires: python3-pytest >= 3.7 |
744badc2 JB |
49 | BuildRequires: python3-pytest-cov >= 2.5.1 |
50 | BuildRequires: python3-pytest-fixture-config | |
6502ae9a | 51 | BuildRequires: python3-pytest-flake8 |
744badc2 JB |
52 | BuildRequires: python3-pytest-virtualenv >= 1.2.7 |
53 | BuildRequires: python3-virtualenv >= 13.0.0 | |
54 | BuildRequires: python3-wheel | |
e2cd79ed | 55 | %endif |
5c02125b | 56 | %if %{with apidocs} |
be14e546 | 57 | BuildRequires: python3-jaraco |
ac973a26 | 58 | BuildRequires: python3-jaraco.packaging >= 6.1 |
744badc2 JB |
59 | BuildRequires: python3-rst.linker >= 1.9 |
60 | BuildRequires: python3-setuptools >= 34 | |
6502ae9a | 61 | BuildRequires: sphinx-pdg-3 >= 1.4 |
5c02125b | 62 | %endif |
c034c756 | 63 | BuildRequires: rpm-pythonprov |
6502ae9a | 64 | BuildRequires: rpmbuild(macros) >= 1.714 |
6ef7e1f8 | 65 | BuildRequires: unzip |
744badc2 JB |
66 | Requires: python-modules >= 1:2.7 |
67 | %if %{with system_libs} | |
68 | # versions from pkg_resources/_vendor/vendored.txt | |
69 | Requires: python-appdirs >= 1.4.0 | |
70 | Requires: python-packaging >= 16.8 | |
71 | Requires: python-pyparsing >= 2.1.10 | |
72 | Requires: python-six >= 1.10.0 | |
73 | %endif | |
64c5aa5e | 74 | Obsoletes: python-distribute < 0.7 |
c034c756 | 75 | Obsoletes: python-setuptools-devel |
b79e62bc AM |
76 | BuildArch: noarch |
77 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
78 | ||
79 | %description | |
80 | setuptools is a collection of enhancements to the Python distutils | |
c034c756 JB |
81 | that allow you to more easily build and distribute Python 2.x |
82 | packages, especially ones that have dependencies on other packages. | |
b79e62bc | 83 | |
1c17442b | 84 | %description -l pl.UTF-8 |
d539774b | 85 | setuptools to zestaw rozszerzeń do pythonowych distutils umożliwiający |
c034c756 JB |
86 | łatwiejsze budowanie i rozprowadzanie pakietów Pythona 2.x, |
87 | szczególnie tych mających zależności od innych pakietów. | |
d539774b JB |
88 | |
89 | Ten pakiet zawiera składniki uruchomieniowe setuptools, potrzebne do | |
c034c756 JB |
90 | uruchamiania kodu wymagającego pkg_resources.py, przeznaczone dla |
91 | Pythona 2.x. | |
eadb908c | 92 | |
25fb9ea9 | 93 | %package -n easy_install |
403a922f JB |
94 | Summary: Python software installer (deprecated) |
95 | Summary(pl.UTF-8): Instalator oprogramowania napisanego w Pythonie (przestarzały) | |
25fb9ea9 JK |
96 | Group: Libraries/Python |
97 | %if %{with python3_default} | |
98 | Requires: python3-%{module} = %{epoch}:%{version}-%{release} | |
99 | %else | |
100 | Requires: python-%{module} = %{epoch}:%{version}-%{release} | |
101 | %endif | |
b6cbc91d | 102 | Conflicts: python-setuptools < 1:18.6.1-2 |
25fb9ea9 JK |
103 | |
104 | %description -n easy_install | |
403a922f | 105 | Python software installer. It's deprecated in favour of pip. |
25fb9ea9 | 106 | |
23dd6491 | 107 | %description -n easy_install -l pl.UTF-8 |
403a922f JB |
108 | Instalator oprogramowania napisanego w Pythonie. Jest przestarzały, |
109 | aktualnym zamiennikiem jest pip. | |
25fb9ea9 | 110 | |
2f649423 MK |
111 | %package apidocs |
112 | Summary: %{module} API documentation | |
113 | Summary(pl.UTF-8): Dokumentacja API %{module} | |
114 | Group: Documentation | |
115 | ||
116 | %description apidocs | |
117 | API documentation for %{module}. | |
118 | ||
119 | %description apidocs -l pl.UTF-8 | |
120 | Dokumentacja API %{module}. | |
121 | ||
b79e62bc | 122 | %prep |
2f649423 | 123 | %setup -q -n %{module}-%{version} |
b79e62bc | 124 | |
744badc2 JB |
125 | %if %{with system_libs} |
126 | exit 1 # TODO: unvendor modules from pkg_resources/_vendor | |
127 | %endif | |
128 | ||
b79e62bc | 129 | %build |
6502ae9a JB |
130 | LC_ALL=C.UTF-8 \ |
131 | %py3_build | |
132 | ||
133 | %{?with_tests:%{__python3} -m pytest pkg_resources/tests setuptools/tests tests} | |
b79e62bc | 134 | |
c034c756 | 135 | %if %{with apidocs} |
6502ae9a | 136 | %{__make} -C docs html SPHINXBUILD=sphinx-build-3 |
c034c756 JB |
137 | %endif |
138 | ||
b79e62bc AM |
139 | %install |
140 | rm -rf $RPM_BUILD_ROOT | |
141 | ||
a21b5be7 | 142 | %py3_install |
991fba2b | 143 | |
b6cbc91d | 144 | ln -sf easy_install-%{py3_ver} $RPM_BUILD_ROOT%{_bindir}/easy_install |
25fb9ea9 | 145 | |
b79e62bc AM |
146 | %clean |
147 | rm -rf $RPM_BUILD_ROOT | |
148 | ||
149 | %files | |
150 | %defattr(644,root,root,755) | |
744badc2 | 151 | %doc CHANGES.rst LICENSE README.rst |
25fb9ea9 | 152 | %attr(755,root,root) %{_bindir}/easy_install-%{py3_ver} |
c034c756 | 153 | %{py3_sitescriptdir}/__pycache__/easy_install.*.py[co] |
5c02125b JB |
154 | %{py3_sitescriptdir}/pkg_resources |
155 | %{py3_sitescriptdir}/setuptools | |
2f649423 | 156 | %{py3_sitescriptdir}/easy_install.py |
2f649423 | 157 | %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info |
2f649423 | 158 | |
25fb9ea9 JK |
159 | %files -n easy_install |
160 | %defattr(644,root,root,755) | |
161 | %attr(755,root,root) %{_bindir}/easy_install | |
162 | ||
c034c756 | 163 | %if %{with apidocs} |
2f649423 MK |
164 | %files apidocs |
165 | %defattr(644,root,root,755) | |
6502ae9a | 166 | %doc docs/build/html/{_static,*.html,*.js} |
2f649423 | 167 | %endif |