]> git.pld-linux.org Git - packages/python-setuptools.git/blame - python-setuptools.spec
- updated to 18.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
1c51337f
JB
13Version: 18.3.1
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
1c51337f 20# Source0-md5: 748187b93152fa60287dfb896837fd7c
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
275d51dc 29#BuildRequires: python-setuptools > 7.0
5aca2e98 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
275d51dc 38#BuildRequires: python3-setuptools > 7.0
5aca2e98 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 98
54dda11e
JB
99# missing file, required by docs build (as of 18.3)
100touch CHANGES.txt
101
b79e62bc 102%build
2f649423 103%if %{with python2}
c034c756 104LC_ALL=en_US.UTF-8 \
2f649423
MK
105%{__python} setup.py build --build-base build-2 %{?with_tests:test}
106%endif
107
108%if %{with python3}
c034c756 109LC_ALL=en_US.UTF-8 \
2f649423
MK
110%{__python3} setup.py build --build-base build-3 %{?with_tests:test}
111%endif
b79e62bc 112
c034c756 113%if %{with apidocs}
5c02125b
JB
114#%{__make} -C docs html
115# rst.linker needs sphinx-build to be run from directory containing "CHANGES.txt"
116sphinx-build -b html -d build/doctrees -D latex_paper_size=a4 docs build/html
c034c756
JB
117%endif
118
b79e62bc
AM
119%install
120rm -rf $RPM_BUILD_ROOT
121
c034c756
JB
122%if %{with python3}
123%{__python3} setup.py \
124 build --build-base build-3 \
2f649423
MK
125 install --skip-build \
126 --optimize=2 \
b79e62bc 127 --root=$RPM_BUILD_ROOT
2f649423 128%endif
991fba2b 129
c034c756
JB
130%if %{with python2}
131%{__python} setup.py \
132 build --build-base build-2 \
2f649423
MK
133 install --skip-build \
134 --optimize=2 \
135 --root=$RPM_BUILD_ROOT
c034c756
JB
136
137%py_postclean
2f649423 138%endif
b79e62bc
AM
139
140%clean
141rm -rf $RPM_BUILD_ROOT
142
2f649423 143%if %{with python2}
b79e62bc
AM
144%files
145%defattr(644,root,root,755)
54dda11e 146%doc README.txt
2f649423
MK
147%attr(755,root,root) %{_bindir}/easy_install
148%attr(755,root,root) %{_bindir}/easy_install-2.*
5c02125b
JB
149%{py_sitescriptdir}/pkg_resources
150%{py_sitescriptdir}/setuptools
2f649423
MK
151%{py_sitescriptdir}/_markerlib
152%{py_sitescriptdir}/easy_install.py[co]
2f649423
MK
153%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
154%endif
2f649423
MK
155
156%if %{with python3}
157%files -n python3-%{module}
f4841952 158%defattr(644,root,root,755)
54dda11e 159%doc README.txt
2f649423 160%attr(755,root,root) %{_bindir}/easy_install-3.*
c034c756 161%{py3_sitescriptdir}/__pycache__/easy_install.*.py[co]
5c02125b
JB
162%{py3_sitescriptdir}/pkg_resources
163%{py3_sitescriptdir}/setuptools
2f649423
MK
164%{py3_sitescriptdir}/_markerlib
165%{py3_sitescriptdir}/easy_install.py
2f649423
MK
166%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
167%endif
168
c034c756 169%if %{with apidocs}
2f649423
MK
170%files apidocs
171%defattr(644,root,root,755)
5c02125b 172%doc build/html/*
2f649423 173%endif
This page took 0.131101 seconds and 4 git commands to generate.