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: http://cheeseshop.python.org/packages/source/s/setuptools/setuptools-%{version}.tar.gz
18 # Source0-md5: b79fab610e362fe8e3a9cb92fb9d95ef
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-setuptools-devel
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38 setuptools is a collection of enhancements to the Python distutils
39 that allow you to more easily build and distribute Python 2.x
40 packages, especially ones that have dependencies on other packages.
42 %description -l pl.UTF-8
43 setuptools to zestaw rozszerzeń do pythonowych distutils umożliwiający
44 łatwiejsze budowanie i rozprowadzanie pakietów Pythona 2.x,
45 szczególnie tych mających zależności od innych pakietów.
47 Ten pakiet zawiera składniki uruchomieniowe setuptools, potrzebne do
48 uruchamiania kodu wymagającego pkg_resources.py, przeznaczone dla
51 %package -n python3-%{module}
52 Summary: A collection of enhancements to the Python distutils
53 Summary(pl.UTF-8): Zestaw rozszerzeń dla pythonowych distutils
54 Group: Libraries/Python
55 Requires: python3-modules >= 1:3.2
57 %description -n python3-%{module}
58 setuptools is a collection of enhancements to the Python distutils
59 that allow you to more easily build and distribute Python 3.x
60 packages, especially ones that have dependencies on other packages.
62 %description -n python3-%{module} -l pl.UTF-8
63 setuptools to zestaw rozszerzeń do pythonowych distutils umożliwiający
64 łatwiejsze budowanie i rozprowadzanie pakietów Pythona 3.x,
65 szczególnie tych mających zależności od innych pakietów.
68 Summary: %{module} API documentation
69 Summary(pl.UTF-8): Dokumentacja API %{module}
73 API documentation for %{module}.
75 %description apidocs -l pl.UTF-8
76 Dokumentacja API %{module}.
79 %setup -q -n %{module}-%{version}
84 %{__python} setup.py build --build-base build-2 %{?with_tests:test}
89 %{__python3} setup.py build --build-base build-3 %{?with_tests:test}
93 %{__make} -C docs html
97 rm -rf $RPM_BUILD_ROOT
100 %{__python3} setup.py \
101 build --build-base build-3 \
102 install --skip-build \
104 --root=$RPM_BUILD_ROOT
108 %{__python} setup.py \
109 build --build-base build-2 \
110 install --skip-build \
112 --root=$RPM_BUILD_ROOT
118 rm -rf $RPM_BUILD_ROOT
122 %defattr(644,root,root,755)
123 %doc CHANGES.txt README.txt DEVGUIDE.txt
124 %attr(755,root,root) %{_bindir}/easy_install
125 %attr(755,root,root) %{_bindir}/easy_install-2.*
126 %{py_sitescriptdir}/%{module}
127 %{py_sitescriptdir}/_markerlib
128 %{py_sitescriptdir}/easy_install.py[co]
129 %{py_sitescriptdir}/pkg_resources.py[co]
130 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
134 %files -n python3-%{module}
135 %defattr(644,root,root,755)
136 %doc CHANGES.txt README.txt DEVGUIDE.txt
137 %attr(755,root,root) %{_bindir}/easy_install-3.*
138 %{py3_sitescriptdir}/__pycache__/easy_install.*.py[co]
139 %{py3_sitescriptdir}/__pycache__/pkg_resources.*.py[co]
140 %{py3_sitescriptdir}/%{module}
141 %{py3_sitescriptdir}/_markerlib
142 %{py3_sitescriptdir}/easy_install.py
143 %{py3_sitescriptdir}/pkg_resources.py
144 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
149 %defattr(644,root,root,755)
150 %doc docs/build/html/*