]> git.pld-linux.org Git - packages/python-setuptools.git/blame - python-setuptools.spec
adapterized
[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 26%if %{with bootstrap}
5aca2e98 27BuildRequires: python-distribute < 0.7
64c5aa5e 28%else
5aca2e98
JK
29BuildRequires: python-setuptools > 7.0
30BuildConflicts: python-distribute < 0.7
64c5aa5e 31%endif
c034c756 32BuildRequires: python-modules >= 1:2.6
2f649423
MK
33%endif
34%if %{with python3}
64c5aa5e 35%if %{with bootstrap}
5aca2e98 36BuildRequires: python3-distribute < 0.7
64c5aa5e 37%else
5aca2e98
JK
38BuildRequires: python3-setuptools > 7.0
39BuildConflicts: python3-distribute < 0.7
64c5aa5e 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
ff466203 73Obsoletes: python3-distribute < 0.7
2f649423
MK
74
75%description -n python3-%{module}
c034c756
JB
76setuptools is a collection of enhancements to the Python distutils
77that allow you to more easily build and distribute Python 3.x
78packages, especially ones that have dependencies on other packages.
2f649423
MK
79
80%description -n python3-%{module} -l pl.UTF-8
c034c756
JB
81setuptools to zestaw rozszerzeń do pythonowych distutils umożliwiający
82łatwiejsze budowanie i rozprowadzanie pakietów Pythona 3.x,
83szczególnie tych mających zależności od innych pakietów.
2f649423
MK
84
85%package apidocs
86Summary: %{module} API documentation
87Summary(pl.UTF-8): Dokumentacja API %{module}
88Group: Documentation
89
90%description apidocs
91API documentation for %{module}.
92
93%description apidocs -l pl.UTF-8
94Dokumentacja API %{module}.
95
b79e62bc 96%prep
2f649423 97%setup -q -n %{module}-%{version}
b79e62bc
AM
98
99%build
2f649423 100%if %{with python2}
c034c756 101LC_ALL=en_US.UTF-8 \
2f649423
MK
102%{__python} setup.py build --build-base build-2 %{?with_tests:test}
103%endif
104
105%if %{with python3}
c034c756 106LC_ALL=en_US.UTF-8 \
2f649423
MK
107%{__python3} setup.py build --build-base build-3 %{?with_tests:test}
108%endif
b79e62bc 109
c034c756 110%if %{with apidocs}
5c02125b
JB
111#%{__make} -C docs html
112# rst.linker needs sphinx-build to be run from directory containing "CHANGES.txt"
113sphinx-build -b html -d build/doctrees -D latex_paper_size=a4 docs build/html
c034c756
JB
114%endif
115
b79e62bc
AM
116%install
117rm -rf $RPM_BUILD_ROOT
118
c034c756
JB
119%if %{with python3}
120%{__python3} setup.py \
121 build --build-base build-3 \
2f649423
MK
122 install --skip-build \
123 --optimize=2 \
b79e62bc 124 --root=$RPM_BUILD_ROOT
2f649423 125%endif
991fba2b 126
c034c756
JB
127%if %{with python2}
128%{__python} setup.py \
129 build --build-base build-2 \
2f649423
MK
130 install --skip-build \
131 --optimize=2 \
132 --root=$RPM_BUILD_ROOT
c034c756
JB
133
134%py_postclean
2f649423 135%endif
b79e62bc
AM
136
137%clean
138rm -rf $RPM_BUILD_ROOT
139
2f649423 140%if %{with python2}
b79e62bc
AM
141%files
142%defattr(644,root,root,755)
b79ba3d0 143%doc CHANGES.txt README.txt DEVGUIDE.txt
2f649423
MK
144%attr(755,root,root) %{_bindir}/easy_install
145%attr(755,root,root) %{_bindir}/easy_install-2.*
5c02125b
JB
146%{py_sitescriptdir}/pkg_resources
147%{py_sitescriptdir}/setuptools
2f649423
MK
148%{py_sitescriptdir}/_markerlib
149%{py_sitescriptdir}/easy_install.py[co]
2f649423
MK
150%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
151%endif
2f649423
MK
152
153%if %{with python3}
154%files -n python3-%{module}
f4841952 155%defattr(644,root,root,755)
b79ba3d0 156%doc CHANGES.txt README.txt DEVGUIDE.txt
2f649423 157%attr(755,root,root) %{_bindir}/easy_install-3.*
c034c756 158%{py3_sitescriptdir}/__pycache__/easy_install.*.py[co]
5c02125b
JB
159%{py3_sitescriptdir}/pkg_resources
160%{py3_sitescriptdir}/setuptools
2f649423
MK
161%{py3_sitescriptdir}/_markerlib
162%{py3_sitescriptdir}/easy_install.py
2f649423
MK
163%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
164%endif
165
c034c756 166%if %{with apidocs}
2f649423
MK
167%files apidocs
168%defattr(644,root,root,755)
5c02125b 169%doc build/html/*
2f649423 170%endif
This page took 0.130406 seconds and 4 git commands to generate.