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