]>
Commit | Line | Data |
---|---|---|
2f649423 MK |
1 | # |
2 | # Conditional build: | |
e2cd79ed | 3 | %bcond_without apidocs # Sphinx based documentation |
6502ae9a | 4 | %bcond_with tests # py.test tests (few failures) |
e2cd79ed JB |
5 | %bcond_without python2 # CPython 2.x module |
6 | %bcond_without python3 # CPython 3.x module | |
25fb9ea9 JK |
7 | %bcond_without python3_default # Use Python 3.x for easy_install executable |
8 | ||
9 | %if %{without python3} | |
10 | %undefine python3_default | |
11 | %endif | |
2f649423 | 12 | |
cb552c1a | 13 | %define module setuptools |
b79e62bc | 14 | Summary: A collection of enhancements to the Python distutils |
e4a6c4e2 | 15 | Summary(pl.UTF-8): Zestaw rozszerzeń dla pythonowych distutils |
b79e62bc | 16 | Name: python-setuptools |
6502ae9a | 17 | Version: 34.3.3 |
505e497f | 18 | Release: 3 |
67093d8e | 19 | Epoch: 1 |
2f649423 | 20 | License: PSF or ZPL |
b79e62bc | 21 | Group: Development/Languages/Python |
e2cd79ed | 22 | #Source0Download: https://pypi.python.org/simple/setuptools/ |
6502ae9a JB |
23 | Source0: https://pypi.python.org/packages/d5/b7/e52b7dccd3f91eec858309dcd931c1387bf70b6d458c86a9bfcb50134fbd/setuptools-%{version}.zip |
24 | # Source0-md5: 696941b10b15f0717be957a4d6cfc12e | |
1ca207b5 | 25 | URL: https://github.com/pypa/setuptools |
6502ae9a | 26 | %if %(locale -a | grep -q '^C.UTF-8$'; echo $?) |
c034c756 JB |
27 | BuildRequires: glibc-localedb-all |
28 | %endif | |
2f649423 | 29 | %if %{with python2} |
724eed28 | 30 | BuildRequires: python-appdirs >= 1.4.0 |
c034c756 | 31 | BuildRequires: python-modules >= 1:2.6 |
af1d3d4d | 32 | BuildRequires: python-packaging >= 16.8 |
b6cbc91d | 33 | BuildConflicts: python-distribute < 0.7 |
929b3f4d | 34 | BuildRequires: python-six >= 1.6.0 |
e2cd79ed | 35 | %if %{with tests} |
6502ae9a | 36 | BuildRequires: python-backports.unittest_mock >= 1.2 |
6502ae9a JB |
37 | BuildRequires: python-pytest >= 3.0.2 |
38 | BuildRequires: python-pytest-flake8 | |
e2cd79ed | 39 | %endif |
2f649423 MK |
40 | %endif |
41 | %if %{with python3} | |
724eed28 | 42 | BuildRequires: python3-appdirs >= 1.4.0 |
6502ae9a | 43 | BuildRequires: python3-modules >= 1:3.3 |
af1d3d4d | 44 | BuildRequires: python3-packaging >= 16.8 |
929b3f4d | 45 | BuildRequires: python3-six >= 1.6.0 |
b6cbc91d | 46 | BuildConflicts: python3-distribute < 0.7 |
e2cd79ed | 47 | %if %{with tests} |
6502ae9a JB |
48 | BuildRequires: python3-pytest >= 3.0.2 |
49 | BuildRequires: python3-pytest-flake8 | |
e2cd79ed | 50 | %endif |
2f649423 | 51 | %endif |
5c02125b | 52 | %if %{with apidocs} |
6502ae9a JB |
53 | BuildRequires: python3-rst.linker >= 1.6.1 |
54 | BuildRequires: sphinx-pdg-3 >= 1.4 | |
5c02125b | 55 | %endif |
c034c756 | 56 | BuildRequires: rpm-pythonprov |
6502ae9a | 57 | BuildRequires: rpmbuild(macros) >= 1.714 |
6ef7e1f8 | 58 | BuildRequires: unzip |
c034c756 | 59 | Requires: python-modules >= 1:2.6 |
64c5aa5e | 60 | Obsoletes: python-distribute < 0.7 |
c034c756 | 61 | Obsoletes: python-setuptools-devel |
b79e62bc AM |
62 | BuildArch: noarch |
63 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
64 | ||
65 | %description | |
66 | setuptools is a collection of enhancements to the Python distutils | |
c034c756 JB |
67 | that allow you to more easily build and distribute Python 2.x |
68 | packages, especially ones that have dependencies on other packages. | |
b79e62bc | 69 | |
1c17442b | 70 | %description -l pl.UTF-8 |
d539774b | 71 | setuptools to zestaw rozszerzeń do pythonowych distutils umożliwiający |
c034c756 JB |
72 | łatwiejsze budowanie i rozprowadzanie pakietów Pythona 2.x, |
73 | szczególnie tych mających zależności od innych pakietów. | |
d539774b JB |
74 | |
75 | Ten pakiet zawiera składniki uruchomieniowe setuptools, potrzebne do | |
c034c756 JB |
76 | uruchamiania kodu wymagającego pkg_resources.py, przeznaczone dla |
77 | Pythona 2.x. | |
eadb908c | 78 | |
2f649423 | 79 | %package -n python3-%{module} |
c034c756 JB |
80 | Summary: A collection of enhancements to the Python distutils |
81 | Summary(pl.UTF-8): Zestaw rozszerzeń dla pythonowych distutils | |
2f649423 | 82 | Group: Libraries/Python |
6502ae9a | 83 | Requires: python3-modules >= 1:3.3 |
ff466203 | 84 | Obsoletes: python3-distribute < 0.7 |
2f649423 MK |
85 | |
86 | %description -n python3-%{module} | |
c034c756 JB |
87 | setuptools is a collection of enhancements to the Python distutils |
88 | that allow you to more easily build and distribute Python 3.x | |
89 | packages, especially ones that have dependencies on other packages. | |
2f649423 MK |
90 | |
91 | %description -n python3-%{module} -l pl.UTF-8 | |
c034c756 JB |
92 | setuptools to zestaw rozszerzeń do pythonowych distutils umożliwiający |
93 | łatwiejsze budowanie i rozprowadzanie pakietów Pythona 3.x, | |
94 | szczególnie tych mających zależności od innych pakietów. | |
2f649423 | 95 | |
25fb9ea9 JK |
96 | %package -n easy_install |
97 | Summary: Python software installer | |
98 | Summary(pl.UTF-8): Instalator oprogramowania napisanego w Pythonie | |
99 | Group: Libraries/Python | |
100 | %if %{with python3_default} | |
101 | Requires: python3-%{module} = %{epoch}:%{version}-%{release} | |
102 | %else | |
103 | Requires: python-%{module} = %{epoch}:%{version}-%{release} | |
104 | %endif | |
b6cbc91d | 105 | Conflicts: python-setuptools < 1:18.6.1-2 |
25fb9ea9 JK |
106 | |
107 | %description -n easy_install | |
108 | Python software installer. | |
109 | ||
23dd6491 | 110 | %description -n easy_install -l pl.UTF-8 |
25fb9ea9 JK |
111 | Instalator oprogramowania napisanego w Pythonie. |
112 | ||
2f649423 MK |
113 | %package apidocs |
114 | Summary: %{module} API documentation | |
115 | Summary(pl.UTF-8): Dokumentacja API %{module} | |
116 | Group: Documentation | |
117 | ||
118 | %description apidocs | |
119 | API documentation for %{module}. | |
120 | ||
121 | %description apidocs -l pl.UTF-8 | |
122 | Dokumentacja API %{module}. | |
123 | ||
b79e62bc | 124 | %prep |
2f649423 | 125 | %setup -q -n %{module}-%{version} |
b79e62bc AM |
126 | |
127 | %build | |
2f649423 | 128 | %if %{with python2} |
6502ae9a JB |
129 | LC_ALL=C.UTF-8 \ |
130 | %py_build | |
131 | ||
132 | %{?with_tests:%{__python} -m pytest pkg_resources/tests setuptools/tests tests} | |
2f649423 MK |
133 | %endif |
134 | ||
135 | %if %{with python3} | |
6502ae9a JB |
136 | LC_ALL=C.UTF-8 \ |
137 | %py3_build | |
138 | ||
139 | %{?with_tests:%{__python3} -m pytest pkg_resources/tests setuptools/tests tests} | |
2f649423 | 140 | %endif |
b79e62bc | 141 | |
c034c756 | 142 | %if %{with apidocs} |
6502ae9a | 143 | %{__make} -C docs html SPHINXBUILD=sphinx-build-3 |
c034c756 JB |
144 | %endif |
145 | ||
b79e62bc AM |
146 | %install |
147 | rm -rf $RPM_BUILD_ROOT | |
148 | ||
c034c756 | 149 | %if %{with python3} |
a21b5be7 | 150 | %py3_install |
2f649423 | 151 | %endif |
991fba2b | 152 | |
c034c756 | 153 | %if %{with python2} |
a21b5be7 | 154 | %py_install |
c034c756 | 155 | |
4ba39be8 JB |
156 | # note: setuptools/command/easy_install.py expects setuptools/site-patch.py to exist |
157 | %py_postclean -x site-patch.py | |
2f649423 | 158 | %endif |
b79e62bc | 159 | |
25fb9ea9 | 160 | %if %{with python3_default} |
b6cbc91d | 161 | ln -sf easy_install-%{py3_ver} $RPM_BUILD_ROOT%{_bindir}/easy_install |
25fb9ea9 | 162 | %else |
b6cbc91d | 163 | ln -sf easy_install-%{py_ver} $RPM_BUILD_ROOT%{_bindir}/easy_install |
25fb9ea9 JK |
164 | %endif |
165 | ||
b79e62bc AM |
166 | %clean |
167 | rm -rf $RPM_BUILD_ROOT | |
168 | ||
2f649423 | 169 | %if %{with python2} |
b79e62bc AM |
170 | %files |
171 | %defattr(644,root,root,755) | |
1ca207b5 | 172 | %doc CHANGES.rst README.rst |
25fb9ea9 | 173 | %attr(755,root,root) %{_bindir}/easy_install-%{py_ver} |
5c02125b JB |
174 | %{py_sitescriptdir}/pkg_resources |
175 | %{py_sitescriptdir}/setuptools | |
2f649423 | 176 | %{py_sitescriptdir}/easy_install.py[co] |
2f649423 MK |
177 | %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info |
178 | %endif | |
2f649423 MK |
179 | |
180 | %if %{with python3} | |
181 | %files -n python3-%{module} | |
f4841952 | 182 | %defattr(644,root,root,755) |
1ca207b5 | 183 | %doc CHANGES.rst README.rst |
25fb9ea9 | 184 | %attr(755,root,root) %{_bindir}/easy_install-%{py3_ver} |
c034c756 | 185 | %{py3_sitescriptdir}/__pycache__/easy_install.*.py[co] |
5c02125b JB |
186 | %{py3_sitescriptdir}/pkg_resources |
187 | %{py3_sitescriptdir}/setuptools | |
2f649423 | 188 | %{py3_sitescriptdir}/easy_install.py |
2f649423 MK |
189 | %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info |
190 | %endif | |
191 | ||
25fb9ea9 JK |
192 | %files -n easy_install |
193 | %defattr(644,root,root,755) | |
194 | %attr(755,root,root) %{_bindir}/easy_install | |
195 | ||
c034c756 | 196 | %if %{with apidocs} |
2f649423 MK |
197 | %files apidocs |
198 | %defattr(644,root,root,755) | |
6502ae9a | 199 | %doc docs/build/html/{_static,*.html,*.js} |
2f649423 | 200 | %endif |