]>
Commit | Line | Data |
---|---|---|
2f649423 MK |
1 | # |
2 | # Conditional build: | |
c034c756 JB |
3 | %bcond_without apidocs # sphinx based documentation |
4 | %bcond_with tests # "test" action (fails?) | |
2f649423 MK |
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 |
c92c30e5 | 17 | Version: 18.6.1 |
25fb9ea9 | 18 | Release: 2 |
67093d8e | 19 | Epoch: 1 |
2f649423 | 20 | License: PSF or ZPL |
b79e62bc | 21 | Group: Development/Languages/Python |
5c02125b | 22 | #Source0Download: https://pypi.python.org/pypi/setuptools |
15009e3d | 23 | Source0: https://pypi.python.org/packages/source/s/setuptools/setuptools-%{version}.tar.gz |
c92c30e5 | 24 | # Source0-md5: d4797a533b3c7466fd36a791c2de94d2 |
2f649423 | 25 | URL: https://bitbucket.org/pypa/setuptools |
c034c756 JB |
26 | %if %(locale -a | grep -q '^en_US.UTF-8$'; echo $?) |
27 | BuildRequires: glibc-localedb-all | |
28 | %endif | |
2f649423 | 29 | %if %{with python2} |
5aca2e98 | 30 | BuildConflicts: python-distribute < 0.7 |
c034c756 | 31 | BuildRequires: python-modules >= 1:2.6 |
2f649423 MK |
32 | %endif |
33 | %if %{with python3} | |
5aca2e98 | 34 | BuildConflicts: python3-distribute < 0.7 |
c034c756 | 35 | BuildRequires: python3-modules >= 1:3.2 |
2f649423 | 36 | %endif |
5c02125b JB |
37 | %if %{with apidocs} |
38 | BuildRequires: python-rst.linker | |
39 | BuildRequires: sphinx-pdg | |
40 | %endif | |
a21b5be7 | 41 | BuildRequires: rpmbuild(macros) >= 1.710 |
c034c756 JB |
42 | BuildRequires: rpm-pythonprov |
43 | Requires: python-modules >= 1:2.6 | |
64c5aa5e | 44 | Obsoletes: python-distribute < 0.7 |
c034c756 | 45 | Obsoletes: python-setuptools-devel |
b79e62bc AM |
46 | BuildArch: noarch |
47 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
48 | ||
49 | %description | |
50 | setuptools is a collection of enhancements to the Python distutils | |
c034c756 JB |
51 | that allow you to more easily build and distribute Python 2.x |
52 | packages, especially ones that have dependencies on other packages. | |
b79e62bc | 53 | |
1c17442b | 54 | %description -l pl.UTF-8 |
d539774b | 55 | setuptools to zestaw rozszerzeń do pythonowych distutils umożliwiający |
c034c756 JB |
56 | łatwiejsze budowanie i rozprowadzanie pakietów Pythona 2.x, |
57 | szczególnie tych mających zależności od innych pakietów. | |
d539774b JB |
58 | |
59 | Ten pakiet zawiera składniki uruchomieniowe setuptools, potrzebne do | |
c034c756 JB |
60 | uruchamiania kodu wymagającego pkg_resources.py, przeznaczone dla |
61 | Pythona 2.x. | |
eadb908c | 62 | |
2f649423 | 63 | %package -n python3-%{module} |
c034c756 JB |
64 | Summary: A collection of enhancements to the Python distutils |
65 | Summary(pl.UTF-8): Zestaw rozszerzeń dla pythonowych distutils | |
2f649423 | 66 | Group: Libraries/Python |
c034c756 | 67 | Requires: python3-modules >= 1:3.2 |
ff466203 | 68 | Obsoletes: python3-distribute < 0.7 |
2f649423 MK |
69 | |
70 | %description -n python3-%{module} | |
c034c756 JB |
71 | setuptools is a collection of enhancements to the Python distutils |
72 | that allow you to more easily build and distribute Python 3.x | |
73 | packages, especially ones that have dependencies on other packages. | |
2f649423 MK |
74 | |
75 | %description -n python3-%{module} -l pl.UTF-8 | |
c034c756 JB |
76 | setuptools to zestaw rozszerzeń do pythonowych distutils umożliwiający |
77 | łatwiejsze budowanie i rozprowadzanie pakietów Pythona 3.x, | |
78 | szczególnie tych mających zależności od innych pakietów. | |
2f649423 | 79 | |
25fb9ea9 JK |
80 | %package -n easy_install |
81 | Summary: Python software installer | |
82 | Summary(pl.UTF-8): Instalator oprogramowania napisanego w Pythonie | |
83 | Group: Libraries/Python | |
84 | %if %{with python3_default} | |
85 | Requires: python3-%{module} = %{epoch}:%{version}-%{release} | |
86 | %else | |
87 | Requires: python-%{module} = %{epoch}:%{version}-%{release} | |
88 | %endif | |
89 | Conflicts: %{name} < 1:18.6.1-2 | |
90 | ||
91 | %description -n easy_install | |
92 | Python software installer. | |
93 | ||
94 | %description -n easy_install | |
95 | Instalator oprogramowania napisanego w Pythonie. | |
96 | ||
2f649423 MK |
97 | %package apidocs |
98 | Summary: %{module} API documentation | |
99 | Summary(pl.UTF-8): Dokumentacja API %{module} | |
100 | Group: Documentation | |
101 | ||
102 | %description apidocs | |
103 | API documentation for %{module}. | |
104 | ||
105 | %description apidocs -l pl.UTF-8 | |
106 | Dokumentacja API %{module}. | |
107 | ||
b79e62bc | 108 | %prep |
2f649423 | 109 | %setup -q -n %{module}-%{version} |
b79e62bc | 110 | |
54dda11e JB |
111 | # missing file, required by docs build (as of 18.3) |
112 | touch CHANGES.txt | |
113 | ||
b79e62bc | 114 | %build |
2f649423 | 115 | %if %{with python2} |
c034c756 | 116 | LC_ALL=en_US.UTF-8 \ |
a21b5be7 | 117 | %py_build %{?with_tests:test} |
2f649423 MK |
118 | %endif |
119 | ||
120 | %if %{with python3} | |
c034c756 | 121 | LC_ALL=en_US.UTF-8 \ |
a21b5be7 | 122 | %py3_build %{?with_tests:test} |
2f649423 | 123 | %endif |
b79e62bc | 124 | |
c034c756 | 125 | %if %{with apidocs} |
5c02125b JB |
126 | #%{__make} -C docs html |
127 | # rst.linker needs sphinx-build to be run from directory containing "CHANGES.txt" | |
128 | sphinx-build -b html -d build/doctrees -D latex_paper_size=a4 docs build/html | |
c034c756 JB |
129 | %endif |
130 | ||
b79e62bc AM |
131 | %install |
132 | rm -rf $RPM_BUILD_ROOT | |
133 | ||
c034c756 | 134 | %if %{with python3} |
a21b5be7 | 135 | %py3_install |
2f649423 | 136 | %endif |
991fba2b | 137 | |
c034c756 | 138 | %if %{with python2} |
a21b5be7 | 139 | %py_install |
c034c756 JB |
140 | |
141 | %py_postclean | |
2f649423 | 142 | %endif |
b79e62bc | 143 | |
25fb9ea9 JK |
144 | %if %{with python3_default} |
145 | ln -f $RPM_BUILD_ROOT/%{_bindir}/easy_install-%{py3_ver} $RPM_BUILD_ROOT/%{_bindir}/easy_install | |
146 | %else | |
147 | ln -f $RPM_BUILD_ROOT/%{_bindir}/easy_install-%{py_ver} $RPM_BUILD_ROOT/%{_bindir}/easy_install | |
148 | %endif | |
149 | ||
b79e62bc AM |
150 | %clean |
151 | rm -rf $RPM_BUILD_ROOT | |
152 | ||
2f649423 | 153 | %if %{with python2} |
b79e62bc AM |
154 | %files |
155 | %defattr(644,root,root,755) | |
54dda11e | 156 | %doc README.txt |
25fb9ea9 | 157 | %attr(755,root,root) %{_bindir}/easy_install-%{py_ver} |
5c02125b JB |
158 | %{py_sitescriptdir}/pkg_resources |
159 | %{py_sitescriptdir}/setuptools | |
2f649423 MK |
160 | %{py_sitescriptdir}/_markerlib |
161 | %{py_sitescriptdir}/easy_install.py[co] | |
2f649423 MK |
162 | %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info |
163 | %endif | |
2f649423 MK |
164 | |
165 | %if %{with python3} | |
166 | %files -n python3-%{module} | |
f4841952 | 167 | %defattr(644,root,root,755) |
54dda11e | 168 | %doc README.txt |
25fb9ea9 | 169 | %attr(755,root,root) %{_bindir}/easy_install-%{py3_ver} |
c034c756 | 170 | %{py3_sitescriptdir}/__pycache__/easy_install.*.py[co] |
5c02125b JB |
171 | %{py3_sitescriptdir}/pkg_resources |
172 | %{py3_sitescriptdir}/setuptools | |
2f649423 MK |
173 | %{py3_sitescriptdir}/_markerlib |
174 | %{py3_sitescriptdir}/easy_install.py | |
2f649423 MK |
175 | %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info |
176 | %endif | |
177 | ||
25fb9ea9 JK |
178 | %files -n easy_install |
179 | %defattr(644,root,root,755) | |
180 | %attr(755,root,root) %{_bindir}/easy_install | |
181 | ||
c034c756 | 182 | %if %{with apidocs} |
2f649423 MK |
183 | %files apidocs |
184 | %defattr(644,root,root,755) | |
5c02125b | 185 | %doc build/html/* |
2f649423 | 186 | %endif |