3 %bcond_without apidocs # sphinx based documentation
4 %bcond_with tests # "test" action (fails?)
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
7 %bcond_with bootstrap # build using old distribute
9 %define module setuptools
10 Summary: A collection of enhancements to the Python distutils
11 Summary(pl.UTF-8): Zestaw rozszerzeń dla pythonowych distutils
12 Name: python-setuptools
17 Group: Development/Languages/Python
18 #Source0Download: https://pypi.python.org/pypi/setuptools
19 Source0: https://pypi.python.org/packages/source/s/setuptools/setuptools-%{version}.tar.gz
20 # Source0-md5: cdba2741b16acaa3ed06c2252623f6b9
21 URL: https://bitbucket.org/pypa/setuptools
22 %if %(locale -a | grep -q '^en_US.UTF-8$'; echo $?)
23 BuildRequires: glibc-localedb-all
27 BuildRequires: python-distribute < 0.7
29 BuildRequires: python-setuptools > 7.0
30 BuildConflicts: python-distribute < 0.7
32 BuildRequires: python-modules >= 1:2.6
36 BuildRequires: python3-distribute < 0.7
38 BuildRequires: python3-setuptools > 7.0
39 BuildConflicts: python3-distribute < 0.7
41 BuildRequires: python3-modules >= 1:3.2
44 BuildRequires: python-rst.linker
45 BuildRequires: sphinx-pdg
47 BuildRequires: rpm-pythonprov
48 Requires: python-modules >= 1:2.6
49 Obsoletes: python-distribute < 0.7
50 Obsoletes: python-setuptools-devel
52 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
55 setuptools is a collection of enhancements to the Python distutils
56 that allow you to more easily build and distribute Python 2.x
57 packages, especially ones that have dependencies on other packages.
59 %description -l pl.UTF-8
60 setuptools to zestaw rozszerzeń do pythonowych distutils umożliwiający
61 łatwiejsze budowanie i rozprowadzanie pakietów Pythona 2.x,
62 szczególnie tych mających zależności od innych pakietów.
64 Ten pakiet zawiera składniki uruchomieniowe setuptools, potrzebne do
65 uruchamiania kodu wymagającego pkg_resources.py, przeznaczone dla
68 %package -n python3-%{module}
69 Summary: A collection of enhancements to the Python distutils
70 Summary(pl.UTF-8): Zestaw rozszerzeń dla pythonowych distutils
71 Group: Libraries/Python
72 Requires: python3-modules >= 1:3.2
73 Obsoletes: python3-distribute < 0.7
75 %description -n python3-%{module}
76 setuptools is a collection of enhancements to the Python distutils
77 that allow you to more easily build and distribute Python 3.x
78 packages, especially ones that have dependencies on other packages.
80 %description -n python3-%{module} -l pl.UTF-8
81 setuptools to zestaw rozszerzeń do pythonowych distutils umożliwiający
82 łatwiejsze budowanie i rozprowadzanie pakietów Pythona 3.x,
83 szczególnie tych mających zależności od innych pakietów.
86 Summary: %{module} API documentation
87 Summary(pl.UTF-8): Dokumentacja API %{module}
91 API documentation for %{module}.
93 %description apidocs -l pl.UTF-8
94 Dokumentacja API %{module}.
97 %setup -q -n %{module}-%{version}
102 %{__python} setup.py build --build-base build-2 %{?with_tests:test}
107 %{__python3} setup.py build --build-base build-3 %{?with_tests:test}
111 #%{__make} -C docs html
112 # rst.linker needs sphinx-build to be run from directory containing "CHANGES.txt"
113 sphinx-build -b html -d build/doctrees -D latex_paper_size=a4 docs build/html
117 rm -rf $RPM_BUILD_ROOT
120 %{__python3} setup.py \
121 build --build-base build-3 \
122 install --skip-build \
124 --root=$RPM_BUILD_ROOT
128 %{__python} setup.py \
129 build --build-base build-2 \
130 install --skip-build \
132 --root=$RPM_BUILD_ROOT
138 rm -rf $RPM_BUILD_ROOT
142 %defattr(644,root,root,755)
143 %doc CHANGES.txt README.txt DEVGUIDE.txt
144 %attr(755,root,root) %{_bindir}/easy_install
145 %attr(755,root,root) %{_bindir}/easy_install-2.*
146 %{py_sitescriptdir}/pkg_resources
147 %{py_sitescriptdir}/setuptools
148 %{py_sitescriptdir}/_markerlib
149 %{py_sitescriptdir}/easy_install.py[co]
150 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
154 %files -n python3-%{module}
155 %defattr(644,root,root,755)
156 %doc CHANGES.txt README.txt DEVGUIDE.txt
157 %attr(755,root,root) %{_bindir}/easy_install-3.*
158 %{py3_sitescriptdir}/__pycache__/easy_install.*.py[co]
159 %{py3_sitescriptdir}/pkg_resources
160 %{py3_sitescriptdir}/setuptools
161 %{py3_sitescriptdir}/_markerlib
162 %{py3_sitescriptdir}/easy_install.py
163 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
168 %defattr(644,root,root,755)