]>
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 |
be14e546 JP |
17 | Version: 40.2.0 |
18 | Release: 1 | |
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/ |
be14e546 JP |
23 | Source0: https://files.pythonhosted.org/packages/ef/1d/201c13e353956a1c840f5d0fbf0461bd45bbd678ea4843ebf25924e8984c/setuptools-%{version}.zip |
24 | # Source0-md5: 592efabea3a65d8e97a025ed52f69b12 | |
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} |
be14e546 JP |
53 | BuildRequires: python3-jaraco |
54 | BuildRequires: python3-jaraco.packaging | |
6502ae9a JB |
55 | BuildRequires: python3-rst.linker >= 1.6.1 |
56 | BuildRequires: sphinx-pdg-3 >= 1.4 | |
5c02125b | 57 | %endif |
c034c756 | 58 | BuildRequires: rpm-pythonprov |
6502ae9a | 59 | BuildRequires: rpmbuild(macros) >= 1.714 |
6ef7e1f8 | 60 | BuildRequires: unzip |
c034c756 | 61 | Requires: python-modules >= 1:2.6 |
64c5aa5e | 62 | Obsoletes: python-distribute < 0.7 |
c034c756 | 63 | Obsoletes: python-setuptools-devel |
b79e62bc AM |
64 | BuildArch: noarch |
65 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
66 | ||
67 | %description | |
68 | setuptools is a collection of enhancements to the Python distutils | |
c034c756 JB |
69 | that allow you to more easily build and distribute Python 2.x |
70 | packages, especially ones that have dependencies on other packages. | |
b79e62bc | 71 | |
1c17442b | 72 | %description -l pl.UTF-8 |
d539774b | 73 | setuptools to zestaw rozszerzeń do pythonowych distutils umożliwiający |
c034c756 JB |
74 | łatwiejsze budowanie i rozprowadzanie pakietów Pythona 2.x, |
75 | szczególnie tych mających zależności od innych pakietów. | |
d539774b JB |
76 | |
77 | Ten pakiet zawiera składniki uruchomieniowe setuptools, potrzebne do | |
c034c756 JB |
78 | uruchamiania kodu wymagającego pkg_resources.py, przeznaczone dla |
79 | Pythona 2.x. | |
eadb908c | 80 | |
2f649423 | 81 | %package -n python3-%{module} |
c034c756 JB |
82 | Summary: A collection of enhancements to the Python distutils |
83 | Summary(pl.UTF-8): Zestaw rozszerzeń dla pythonowych distutils | |
2f649423 | 84 | Group: Libraries/Python |
6502ae9a | 85 | Requires: python3-modules >= 1:3.3 |
ff466203 | 86 | Obsoletes: python3-distribute < 0.7 |
2f649423 MK |
87 | |
88 | %description -n python3-%{module} | |
c034c756 JB |
89 | setuptools is a collection of enhancements to the Python distutils |
90 | that allow you to more easily build and distribute Python 3.x | |
91 | packages, especially ones that have dependencies on other packages. | |
2f649423 MK |
92 | |
93 | %description -n python3-%{module} -l pl.UTF-8 | |
c034c756 JB |
94 | setuptools to zestaw rozszerzeń do pythonowych distutils umożliwiający |
95 | łatwiejsze budowanie i rozprowadzanie pakietów Pythona 3.x, | |
96 | szczególnie tych mających zależności od innych pakietów. | |
2f649423 | 97 | |
25fb9ea9 JK |
98 | %package -n easy_install |
99 | Summary: Python software installer | |
100 | Summary(pl.UTF-8): Instalator oprogramowania napisanego w Pythonie | |
101 | Group: Libraries/Python | |
102 | %if %{with python3_default} | |
103 | Requires: python3-%{module} = %{epoch}:%{version}-%{release} | |
104 | %else | |
105 | Requires: python-%{module} = %{epoch}:%{version}-%{release} | |
106 | %endif | |
b6cbc91d | 107 | Conflicts: python-setuptools < 1:18.6.1-2 |
25fb9ea9 JK |
108 | |
109 | %description -n easy_install | |
110 | Python software installer. | |
111 | ||
23dd6491 | 112 | %description -n easy_install -l pl.UTF-8 |
25fb9ea9 JK |
113 | Instalator oprogramowania napisanego w Pythonie. |
114 | ||
2f649423 MK |
115 | %package apidocs |
116 | Summary: %{module} API documentation | |
117 | Summary(pl.UTF-8): Dokumentacja API %{module} | |
118 | Group: Documentation | |
119 | ||
120 | %description apidocs | |
121 | API documentation for %{module}. | |
122 | ||
123 | %description apidocs -l pl.UTF-8 | |
124 | Dokumentacja API %{module}. | |
125 | ||
b79e62bc | 126 | %prep |
2f649423 | 127 | %setup -q -n %{module}-%{version} |
b79e62bc AM |
128 | |
129 | %build | |
2f649423 | 130 | %if %{with python2} |
6502ae9a JB |
131 | LC_ALL=C.UTF-8 \ |
132 | %py_build | |
133 | ||
134 | %{?with_tests:%{__python} -m pytest pkg_resources/tests setuptools/tests tests} | |
2f649423 MK |
135 | %endif |
136 | ||
137 | %if %{with python3} | |
6502ae9a JB |
138 | LC_ALL=C.UTF-8 \ |
139 | %py3_build | |
140 | ||
141 | %{?with_tests:%{__python3} -m pytest pkg_resources/tests setuptools/tests tests} | |
2f649423 | 142 | %endif |
b79e62bc | 143 | |
c034c756 | 144 | %if %{with apidocs} |
6502ae9a | 145 | %{__make} -C docs html SPHINXBUILD=sphinx-build-3 |
c034c756 JB |
146 | %endif |
147 | ||
b79e62bc AM |
148 | %install |
149 | rm -rf $RPM_BUILD_ROOT | |
150 | ||
c034c756 | 151 | %if %{with python3} |
a21b5be7 | 152 | %py3_install |
2f649423 | 153 | %endif |
991fba2b | 154 | |
c034c756 | 155 | %if %{with python2} |
a21b5be7 | 156 | %py_install |
c034c756 | 157 | |
4ba39be8 JB |
158 | # note: setuptools/command/easy_install.py expects setuptools/site-patch.py to exist |
159 | %py_postclean -x site-patch.py | |
2f649423 | 160 | %endif |
b79e62bc | 161 | |
25fb9ea9 | 162 | %if %{with python3_default} |
b6cbc91d | 163 | ln -sf easy_install-%{py3_ver} $RPM_BUILD_ROOT%{_bindir}/easy_install |
25fb9ea9 | 164 | %else |
b6cbc91d | 165 | ln -sf easy_install-%{py_ver} $RPM_BUILD_ROOT%{_bindir}/easy_install |
25fb9ea9 JK |
166 | %endif |
167 | ||
b79e62bc AM |
168 | %clean |
169 | rm -rf $RPM_BUILD_ROOT | |
170 | ||
2f649423 | 171 | %if %{with python2} |
b79e62bc AM |
172 | %files |
173 | %defattr(644,root,root,755) | |
1ca207b5 | 174 | %doc CHANGES.rst README.rst |
25fb9ea9 | 175 | %attr(755,root,root) %{_bindir}/easy_install-%{py_ver} |
5c02125b JB |
176 | %{py_sitescriptdir}/pkg_resources |
177 | %{py_sitescriptdir}/setuptools | |
2f649423 | 178 | %{py_sitescriptdir}/easy_install.py[co] |
2f649423 MK |
179 | %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info |
180 | %endif | |
2f649423 MK |
181 | |
182 | %if %{with python3} | |
183 | %files -n python3-%{module} | |
f4841952 | 184 | %defattr(644,root,root,755) |
1ca207b5 | 185 | %doc CHANGES.rst README.rst |
25fb9ea9 | 186 | %attr(755,root,root) %{_bindir}/easy_install-%{py3_ver} |
c034c756 | 187 | %{py3_sitescriptdir}/__pycache__/easy_install.*.py[co] |
5c02125b JB |
188 | %{py3_sitescriptdir}/pkg_resources |
189 | %{py3_sitescriptdir}/setuptools | |
2f649423 | 190 | %{py3_sitescriptdir}/easy_install.py |
2f649423 MK |
191 | %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info |
192 | %endif | |
193 | ||
25fb9ea9 JK |
194 | %files -n easy_install |
195 | %defattr(644,root,root,755) | |
196 | %attr(755,root,root) %{_bindir}/easy_install | |
197 | ||
c034c756 | 198 | %if %{with apidocs} |
2f649423 MK |
199 | %files apidocs |
200 | %defattr(644,root,root,755) | |
6502ae9a | 201 | %doc docs/build/html/{_static,*.html,*.js} |
2f649423 | 202 | %endif |