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