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