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
8 %define module setuptools
9 Summary: A collection of enhancements to the Python distutils
10 Summary(pl.UTF-8): Zestaw rozszerzeń dla pythonowych distutils
11 Name: python-setuptools
16 Group: Development/Languages/Python
17 Source0: https://pypi.python.org/packages/source/s/setuptools/setuptools-%{version}.tar.gz
18 # Source0-md5: 6245d6752e2ef803c365f560f7f2f940
19 URL: https://bitbucket.org/pypa/setuptools
20 %if %(locale -a | grep -q '^en_US.UTF-8$'; echo $?)
21 BuildRequires: glibc-localedb-all
24 BuildRequires: python-distribute
25 BuildRequires: python-modules >= 1:2.6
28 BuildRequires: python3-distribute
29 BuildRequires: python3-modules >= 1:3.2
31 BuildRequires: rpm-pythonprov
32 Requires: python-modules >= 1:2.6
33 Obsoletes: python-distribute
34 Obsoletes: python-setuptools-devel
36 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39 setuptools is a collection of enhancements to the Python distutils
40 that allow you to more easily build and distribute Python 2.x
41 packages, especially ones that have dependencies on other packages.
43 %description -l pl.UTF-8
44 setuptools to zestaw rozszerzeń do pythonowych distutils umożliwiający
45 łatwiejsze budowanie i rozprowadzanie pakietów Pythona 2.x,
46 szczególnie tych mających zależności od innych pakietów.
48 Ten pakiet zawiera składniki uruchomieniowe setuptools, potrzebne do
49 uruchamiania kodu wymagającego pkg_resources.py, przeznaczone dla
52 %package -n python3-%{module}
53 Summary: A collection of enhancements to the Python distutils
54 Summary(pl.UTF-8): Zestaw rozszerzeń dla pythonowych distutils
55 Group: Libraries/Python
56 Requires: python3-modules >= 1:3.2
58 %description -n python3-%{module}
59 setuptools is a collection of enhancements to the Python distutils
60 that allow you to more easily build and distribute Python 3.x
61 packages, especially ones that have dependencies on other packages.
63 %description -n python3-%{module} -l pl.UTF-8
64 setuptools to zestaw rozszerzeń do pythonowych distutils umożliwiający
65 łatwiejsze budowanie i rozprowadzanie pakietów Pythona 3.x,
66 szczególnie tych mających zależności od innych pakietów.
69 Summary: %{module} API documentation
70 Summary(pl.UTF-8): Dokumentacja API %{module}
74 API documentation for %{module}.
76 %description apidocs -l pl.UTF-8
77 Dokumentacja API %{module}.
80 %setup -q -n %{module}-%{version}
85 %{__python} setup.py build --build-base build-2 %{?with_tests:test}
90 %{__python3} setup.py build --build-base build-3 %{?with_tests:test}
94 %{__make} -C docs html
98 rm -rf $RPM_BUILD_ROOT
101 %{__python3} setup.py \
102 build --build-base build-3 \
103 install --skip-build \
105 --root=$RPM_BUILD_ROOT
109 %{__python} setup.py \
110 build --build-base build-2 \
111 install --skip-build \
113 --root=$RPM_BUILD_ROOT
119 rm -rf $RPM_BUILD_ROOT
123 %defattr(644,root,root,755)
124 %doc CHANGES.txt README.txt DEVGUIDE.txt
125 %attr(755,root,root) %{_bindir}/easy_install
126 %attr(755,root,root) %{_bindir}/easy_install-2.*
127 %{py_sitescriptdir}/%{module}
128 %{py_sitescriptdir}/_markerlib
129 %{py_sitescriptdir}/easy_install.py[co]
130 %{py_sitescriptdir}/pkg_resources.py[co]
131 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
135 %files -n python3-%{module}
136 %defattr(644,root,root,755)
137 %doc CHANGES.txt README.txt DEVGUIDE.txt
138 %attr(755,root,root) %{_bindir}/easy_install-3.*
139 %{py3_sitescriptdir}/__pycache__/easy_install.*.py[co]
140 %{py3_sitescriptdir}/__pycache__/pkg_resources.*.py[co]
141 %{py3_sitescriptdir}/%{module}
142 %{py3_sitescriptdir}/_markerlib
143 %{py3_sitescriptdir}/easy_install.py
144 %{py3_sitescriptdir}/pkg_resources.py
145 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
150 %defattr(644,root,root,755)
151 %doc docs/build/html/*