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