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