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