]>
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 |
c92c30e5 | 13 | Version: 18.6.1 |
1c51337f | 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 |
c92c30e5 | 20 | # Source0-md5: d4797a533b3c7466fd36a791c2de94d2 |
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 | 26 | %if %{with bootstrap} |
5aca2e98 | 27 | BuildRequires: python-distribute < 0.7 |
64c5aa5e | 28 | %else |
275d51dc | 29 | #BuildRequires: python-setuptools > 7.0 |
5aca2e98 | 30 | BuildConflicts: python-distribute < 0.7 |
64c5aa5e | 31 | %endif |
c034c756 | 32 | BuildRequires: python-modules >= 1:2.6 |
2f649423 MK |
33 | %endif |
34 | %if %{with python3} | |
64c5aa5e | 35 | %if %{with bootstrap} |
5aca2e98 | 36 | BuildRequires: python3-distribute < 0.7 |
64c5aa5e | 37 | %else |
275d51dc | 38 | #BuildRequires: python3-setuptools > 7.0 |
5aca2e98 | 39 | BuildConflicts: python3-distribute < 0.7 |
64c5aa5e | 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 | |
a21b5be7 | 47 | BuildRequires: rpmbuild(macros) >= 1.710 |
c034c756 JB |
48 | BuildRequires: rpm-pythonprov |
49 | Requires: python-modules >= 1:2.6 | |
64c5aa5e | 50 | Obsoletes: python-distribute < 0.7 |
c034c756 | 51 | Obsoletes: python-setuptools-devel |
b79e62bc AM |
52 | BuildArch: noarch |
53 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
54 | ||
55 | %description | |
56 | setuptools is a collection of enhancements to the Python distutils | |
c034c756 JB |
57 | that allow you to more easily build and distribute Python 2.x |
58 | packages, especially ones that have dependencies on other packages. | |
b79e62bc | 59 | |
1c17442b | 60 | %description -l pl.UTF-8 |
d539774b | 61 | setuptools to zestaw rozszerzeń do pythonowych distutils umożliwiający |
c034c756 JB |
62 | łatwiejsze budowanie i rozprowadzanie pakietów Pythona 2.x, |
63 | szczególnie tych mających zależności od innych pakietów. | |
d539774b JB |
64 | |
65 | Ten pakiet zawiera składniki uruchomieniowe setuptools, potrzebne do | |
c034c756 JB |
66 | uruchamiania kodu wymagającego pkg_resources.py, przeznaczone dla |
67 | Pythona 2.x. | |
eadb908c | 68 | |
2f649423 | 69 | %package -n python3-%{module} |
c034c756 JB |
70 | Summary: A collection of enhancements to the Python distutils |
71 | Summary(pl.UTF-8): Zestaw rozszerzeń dla pythonowych distutils | |
2f649423 | 72 | Group: Libraries/Python |
c034c756 | 73 | Requires: python3-modules >= 1:3.2 |
ff466203 | 74 | Obsoletes: python3-distribute < 0.7 |
2f649423 MK |
75 | |
76 | %description -n python3-%{module} | |
c034c756 JB |
77 | setuptools is a collection of enhancements to the Python distutils |
78 | that allow you to more easily build and distribute Python 3.x | |
79 | packages, especially ones that have dependencies on other packages. | |
2f649423 MK |
80 | |
81 | %description -n python3-%{module} -l pl.UTF-8 | |
c034c756 JB |
82 | setuptools to zestaw rozszerzeń do pythonowych distutils umożliwiający |
83 | łatwiejsze budowanie i rozprowadzanie pakietów Pythona 3.x, | |
84 | szczególnie tych mających zależności od innych pakietów. | |
2f649423 MK |
85 | |
86 | %package apidocs | |
87 | Summary: %{module} API documentation | |
88 | Summary(pl.UTF-8): Dokumentacja API %{module} | |
89 | Group: Documentation | |
90 | ||
91 | %description apidocs | |
92 | API documentation for %{module}. | |
93 | ||
94 | %description apidocs -l pl.UTF-8 | |
95 | Dokumentacja API %{module}. | |
96 | ||
b79e62bc | 97 | %prep |
2f649423 | 98 | %setup -q -n %{module}-%{version} |
b79e62bc | 99 | |
54dda11e JB |
100 | # missing file, required by docs build (as of 18.3) |
101 | touch CHANGES.txt | |
102 | ||
b79e62bc | 103 | %build |
2f649423 | 104 | %if %{with python2} |
c034c756 | 105 | LC_ALL=en_US.UTF-8 \ |
a21b5be7 | 106 | %py_build %{?with_tests:test} |
2f649423 MK |
107 | %endif |
108 | ||
109 | %if %{with python3} | |
c034c756 | 110 | LC_ALL=en_US.UTF-8 \ |
a21b5be7 | 111 | %py3_build %{?with_tests:test} |
2f649423 | 112 | %endif |
b79e62bc | 113 | |
c034c756 | 114 | %if %{with apidocs} |
5c02125b JB |
115 | #%{__make} -C docs html |
116 | # rst.linker needs sphinx-build to be run from directory containing "CHANGES.txt" | |
117 | sphinx-build -b html -d build/doctrees -D latex_paper_size=a4 docs build/html | |
c034c756 JB |
118 | %endif |
119 | ||
b79e62bc AM |
120 | %install |
121 | rm -rf $RPM_BUILD_ROOT | |
122 | ||
c034c756 | 123 | %if %{with python3} |
a21b5be7 | 124 | %py3_install |
2f649423 | 125 | %endif |
991fba2b | 126 | |
c034c756 | 127 | %if %{with python2} |
a21b5be7 | 128 | %py_install |
c034c756 JB |
129 | |
130 | %py_postclean | |
2f649423 | 131 | %endif |
b79e62bc AM |
132 | |
133 | %clean | |
134 | rm -rf $RPM_BUILD_ROOT | |
135 | ||
2f649423 | 136 | %if %{with python2} |
b79e62bc AM |
137 | %files |
138 | %defattr(644,root,root,755) | |
54dda11e | 139 | %doc README.txt |
2f649423 MK |
140 | %attr(755,root,root) %{_bindir}/easy_install |
141 | %attr(755,root,root) %{_bindir}/easy_install-2.* | |
5c02125b JB |
142 | %{py_sitescriptdir}/pkg_resources |
143 | %{py_sitescriptdir}/setuptools | |
2f649423 MK |
144 | %{py_sitescriptdir}/_markerlib |
145 | %{py_sitescriptdir}/easy_install.py[co] | |
2f649423 MK |
146 | %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info |
147 | %endif | |
2f649423 MK |
148 | |
149 | %if %{with python3} | |
150 | %files -n python3-%{module} | |
f4841952 | 151 | %defattr(644,root,root,755) |
54dda11e | 152 | %doc README.txt |
2f649423 | 153 | %attr(755,root,root) %{_bindir}/easy_install-3.* |
c034c756 | 154 | %{py3_sitescriptdir}/__pycache__/easy_install.*.py[co] |
5c02125b JB |
155 | %{py3_sitescriptdir}/pkg_resources |
156 | %{py3_sitescriptdir}/setuptools | |
2f649423 MK |
157 | %{py3_sitescriptdir}/_markerlib |
158 | %{py3_sitescriptdir}/easy_install.py | |
2f649423 MK |
159 | %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info |
160 | %endif | |
161 | ||
c034c756 | 162 | %if %{with apidocs} |
2f649423 MK |
163 | %files apidocs |
164 | %defattr(644,root,root,755) | |
5c02125b | 165 | %doc build/html/* |
2f649423 | 166 | %endif |