]> git.pld-linux.org Git - packages/python-setuptools.git/blame_incremental - python-setuptools.spec
Separate 'easy_install' package, use python3 by default
[packages/python-setuptools.git] / python-setuptools.spec
... / ...
CommitLineData
1#
2# Conditional build:
3%bcond_without apidocs # sphinx based documentation
4%bcond_with tests # "test" action (fails?)
5%bcond_without python2 # CPython 2.x module
6%bcond_without python3 # CPython 3.x module
7%bcond_without python3_default # Use Python 3.x for easy_install executable
8
9%if %{without python3}
10%undefine python3_default
11%endif
12
13%define module setuptools
14Summary: A collection of enhancements to the Python distutils
15Summary(pl.UTF-8): Zestaw rozszerzeń dla pythonowych distutils
16Name: python-setuptools
17Version: 18.6.1
18Release: 2
19Epoch: 1
20License: PSF or ZPL
21Group: Development/Languages/Python
22#Source0Download: https://pypi.python.org/pypi/setuptools
23Source0: https://pypi.python.org/packages/source/s/setuptools/setuptools-%{version}.tar.gz
24# Source0-md5: d4797a533b3c7466fd36a791c2de94d2
25URL: https://bitbucket.org/pypa/setuptools
26%if %(locale -a | grep -q '^en_US.UTF-8$'; echo $?)
27BuildRequires: glibc-localedb-all
28%endif
29%if %{with python2}
30BuildConflicts: python-distribute < 0.7
31BuildRequires: python-modules >= 1:2.6
32%endif
33%if %{with python3}
34BuildConflicts: python3-distribute < 0.7
35BuildRequires: python3-modules >= 1:3.2
36%endif
37%if %{with apidocs}
38BuildRequires: python-rst.linker
39BuildRequires: sphinx-pdg
40%endif
41BuildRequires: rpmbuild(macros) >= 1.710
42BuildRequires: rpm-pythonprov
43Requires: python-modules >= 1:2.6
44Obsoletes: python-distribute < 0.7
45Obsoletes: python-setuptools-devel
46BuildArch: noarch
47BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48
49%description
50setuptools is a collection of enhancements to the Python distutils
51that allow you to more easily build and distribute Python 2.x
52packages, especially ones that have dependencies on other packages.
53
54%description -l pl.UTF-8
55setuptools to zestaw rozszerzeń do pythonowych distutils umożliwiający
56łatwiejsze budowanie i rozprowadzanie pakietów Pythona 2.x,
57szczególnie tych mających zależności od innych pakietów.
58
59Ten pakiet zawiera składniki uruchomieniowe setuptools, potrzebne do
60uruchamiania kodu wymagającego pkg_resources.py, przeznaczone dla
61Pythona 2.x.
62
63%package -n python3-%{module}
64Summary: A collection of enhancements to the Python distutils
65Summary(pl.UTF-8): Zestaw rozszerzeń dla pythonowych distutils
66Group: Libraries/Python
67Requires: python3-modules >= 1:3.2
68Obsoletes: python3-distribute < 0.7
69
70%description -n python3-%{module}
71setuptools is a collection of enhancements to the Python distutils
72that allow you to more easily build and distribute Python 3.x
73packages, especially ones that have dependencies on other packages.
74
75%description -n python3-%{module} -l pl.UTF-8
76setuptools to zestaw rozszerzeń do pythonowych distutils umożliwiający
77łatwiejsze budowanie i rozprowadzanie pakietów Pythona 3.x,
78szczególnie tych mających zależności od innych pakietów.
79
80%package -n easy_install
81Summary: Python software installer
82Summary(pl.UTF-8): Instalator oprogramowania napisanego w Pythonie
83Group: Libraries/Python
84%if %{with python3_default}
85Requires: python3-%{module} = %{epoch}:%{version}-%{release}
86%else
87Requires: python-%{module} = %{epoch}:%{version}-%{release}
88%endif
89Conflicts: %{name} < 1:18.6.1-2
90
91%description -n easy_install
92Python software installer.
93
94%description -n easy_install
95Instalator oprogramowania napisanego w Pythonie.
96
97%package apidocs
98Summary: %{module} API documentation
99Summary(pl.UTF-8): Dokumentacja API %{module}
100Group: Documentation
101
102%description apidocs
103API documentation for %{module}.
104
105%description apidocs -l pl.UTF-8
106Dokumentacja API %{module}.
107
108%prep
109%setup -q -n %{module}-%{version}
110
111# missing file, required by docs build (as of 18.3)
112touch CHANGES.txt
113
114%build
115%if %{with python2}
116LC_ALL=en_US.UTF-8 \
117%py_build %{?with_tests:test}
118%endif
119
120%if %{with python3}
121LC_ALL=en_US.UTF-8 \
122%py3_build %{?with_tests:test}
123%endif
124
125%if %{with apidocs}
126#%{__make} -C docs html
127# rst.linker needs sphinx-build to be run from directory containing "CHANGES.txt"
128sphinx-build -b html -d build/doctrees -D latex_paper_size=a4 docs build/html
129%endif
130
131%install
132rm -rf $RPM_BUILD_ROOT
133
134%if %{with python3}
135%py3_install
136%endif
137
138%if %{with python2}
139%py_install
140
141%py_postclean
142%endif
143
144%if %{with python3_default}
145ln -f $RPM_BUILD_ROOT/%{_bindir}/easy_install-%{py3_ver} $RPM_BUILD_ROOT/%{_bindir}/easy_install
146%else
147ln -f $RPM_BUILD_ROOT/%{_bindir}/easy_install-%{py_ver} $RPM_BUILD_ROOT/%{_bindir}/easy_install
148%endif
149
150%clean
151rm -rf $RPM_BUILD_ROOT
152
153%if %{with python2}
154%files
155%defattr(644,root,root,755)
156%doc README.txt
157%attr(755,root,root) %{_bindir}/easy_install-%{py_ver}
158%{py_sitescriptdir}/pkg_resources
159%{py_sitescriptdir}/setuptools
160%{py_sitescriptdir}/_markerlib
161%{py_sitescriptdir}/easy_install.py[co]
162%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
163%endif
164
165%if %{with python3}
166%files -n python3-%{module}
167%defattr(644,root,root,755)
168%doc README.txt
169%attr(755,root,root) %{_bindir}/easy_install-%{py3_ver}
170%{py3_sitescriptdir}/__pycache__/easy_install.*.py[co]
171%{py3_sitescriptdir}/pkg_resources
172%{py3_sitescriptdir}/setuptools
173%{py3_sitescriptdir}/_markerlib
174%{py3_sitescriptdir}/easy_install.py
175%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
176%endif
177
178%files -n easy_install
179%defattr(644,root,root,755)
180%attr(755,root,root) %{_bindir}/easy_install
181
182%if %{with apidocs}
183%files apidocs
184%defattr(644,root,root,755)
185%doc build/html/*
186%endif
This page took 0.027533 seconds and 4 git commands to generate.