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