]> git.pld-linux.org Git - packages/python-setuptools.git/blob - python-setuptools.spec
- release 3 (by relup.sh)
[packages/python-setuptools.git] / python-setuptools.spec
1 #
2 # Conditional build:
3 %bcond_without  apidocs         # Sphinx based documentation
4 %bcond_with     tests           # py.test tests (few failures)
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
14 Summary:        A collection of enhancements to the Python distutils
15 Summary(pl.UTF-8):      Zestaw rozszerzeń dla pythonowych distutils
16 Name:           python-setuptools
17 Version:        34.3.3
18 Release:        3
19 Epoch:          1
20 License:        PSF or ZPL
21 Group:          Development/Languages/Python
22 #Source0Download: https://pypi.python.org/simple/setuptools/
23 Source0:        https://pypi.python.org/packages/d5/b7/e52b7dccd3f91eec858309dcd931c1387bf70b6d458c86a9bfcb50134fbd/setuptools-%{version}.zip
24 # Source0-md5:  696941b10b15f0717be957a4d6cfc12e
25 URL:            https://github.com/pypa/setuptools
26 %if %(locale -a | grep -q '^C.UTF-8$'; echo $?)
27 BuildRequires:  glibc-localedb-all
28 %endif
29 %if %{with python2}
30 BuildRequires:  python-appdirs >= 1.4.0
31 BuildRequires:  python-modules >= 1:2.6
32 BuildRequires:  python-packaging >= 16.8
33 BuildConflicts: python-distribute < 0.7
34 %if %{with tests}
35 BuildRequires:  python-backports.unittest_mock >= 1.2
36 BuildRequires:  python-pytest >= 3.0.2
37 BuildRequires:  python-pytest-flake8
38 BuildRequires:  python-six >= 1.6.0
39 %endif
40 %endif
41 %if %{with python3}
42 BuildRequires:  python3-appdirs >= 1.4.0
43 BuildRequires:  python3-modules >= 1:3.3
44 BuildRequires:  python3-packaging >= 16.8
45 BuildConflicts: python3-distribute < 0.7
46 %if %{with tests}
47 BuildRequires:  python3-pytest >= 3.0.2
48 BuildRequires:  python3-pytest-flake8
49 BuildRequires:  python3-six >= 1.6.0
50 %endif
51 %endif
52 %if %{with apidocs}
53 BuildRequires:  python3-rst.linker >= 1.6.1
54 BuildRequires:  sphinx-pdg-3 >= 1.4
55 %endif
56 BuildRequires:  rpm-pythonprov
57 BuildRequires:  rpmbuild(macros) >= 1.714
58 Requires:       python-modules >= 1:2.6
59 Obsoletes:      python-distribute < 0.7
60 Obsoletes:      python-setuptools-devel
61 BuildArch:      noarch
62 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
63
64 %description
65 setuptools is a collection of enhancements to the Python distutils
66 that allow you to more easily build and distribute Python 2.x
67 packages, especially ones that have dependencies on other packages.
68
69 %description -l pl.UTF-8
70 setuptools to zestaw rozszerzeń do pythonowych distutils umożliwiający
71 łatwiejsze budowanie i rozprowadzanie pakietów Pythona 2.x,
72 szczególnie tych mających zależności od innych pakietów.
73
74 Ten pakiet zawiera składniki uruchomieniowe setuptools, potrzebne do
75 uruchamiania kodu wymagającego pkg_resources.py, przeznaczone dla
76 Pythona 2.x.
77
78 %package -n python3-%{module}
79 Summary:        A collection of enhancements to the Python distutils
80 Summary(pl.UTF-8):      Zestaw rozszerzeń dla pythonowych distutils
81 Group:          Libraries/Python
82 Requires:       python3-modules >= 1:3.3
83 Obsoletes:      python3-distribute < 0.7
84
85 %description -n python3-%{module}
86 setuptools is a collection of enhancements to the Python distutils
87 that allow you to more easily build and distribute Python 3.x
88 packages, especially ones that have dependencies on other packages.
89
90 %description -n python3-%{module} -l pl.UTF-8
91 setuptools to zestaw rozszerzeń do pythonowych distutils umożliwiający
92 łatwiejsze budowanie i rozprowadzanie pakietów Pythona 3.x,
93 szczególnie tych mających zależności od innych pakietów.
94
95 %package -n easy_install
96 Summary:        Python software installer
97 Summary(pl.UTF-8):      Instalator oprogramowania napisanego w Pythonie
98 Group:          Libraries/Python
99 %if %{with python3_default}
100 Requires:       python3-%{module} = %{epoch}:%{version}-%{release}
101 %else
102 Requires:       python-%{module} = %{epoch}:%{version}-%{release}
103 %endif
104 Conflicts:      python-setuptools < 1:18.6.1-2
105
106 %description -n easy_install
107 Python software installer.
108
109 %description -n easy_install -l pl.UTF-8
110 Instalator oprogramowania napisanego w Pythonie.
111
112 %package apidocs
113 Summary:        %{module} API documentation
114 Summary(pl.UTF-8):      Dokumentacja API %{module}
115 Group:          Documentation
116
117 %description apidocs
118 API documentation for %{module}.
119
120 %description apidocs -l pl.UTF-8
121 Dokumentacja API %{module}.
122
123 %prep
124 %setup -q -n %{module}-%{version}
125
126 %build
127 %if %{with python2}
128 LC_ALL=C.UTF-8 \
129 %py_build
130
131 %{?with_tests:%{__python} -m pytest pkg_resources/tests setuptools/tests tests}
132 %endif
133
134 %if %{with python3}
135 LC_ALL=C.UTF-8 \
136 %py3_build
137
138 %{?with_tests:%{__python3} -m pytest pkg_resources/tests setuptools/tests tests}
139 %endif
140
141 %if %{with apidocs}
142 %{__make} -C docs html SPHINXBUILD=sphinx-build-3
143 %endif
144
145 %install
146 rm -rf $RPM_BUILD_ROOT
147
148 %if %{with python3}
149 %py3_install
150 %endif
151
152 %if %{with python2}
153 %py_install
154
155 # note: setuptools/command/easy_install.py expects setuptools/site-patch.py to exist
156 %py_postclean -x site-patch.py
157 %endif
158
159 %if %{with python3_default}
160 ln -sf easy_install-%{py3_ver} $RPM_BUILD_ROOT%{_bindir}/easy_install
161 %else
162 ln -sf easy_install-%{py_ver} $RPM_BUILD_ROOT%{_bindir}/easy_install
163 %endif
164
165 %clean
166 rm -rf $RPM_BUILD_ROOT
167
168 %if %{with python2}
169 %files
170 %defattr(644,root,root,755)
171 %doc CHANGES.rst README.rst
172 %attr(755,root,root) %{_bindir}/easy_install-%{py_ver}
173 %{py_sitescriptdir}/pkg_resources
174 %{py_sitescriptdir}/setuptools
175 %{py_sitescriptdir}/easy_install.py[co]
176 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
177 %endif
178
179 %if %{with python3}
180 %files -n python3-%{module}
181 %defattr(644,root,root,755)
182 %doc CHANGES.rst README.rst
183 %attr(755,root,root) %{_bindir}/easy_install-%{py3_ver}
184 %{py3_sitescriptdir}/__pycache__/easy_install.*.py[co]
185 %{py3_sitescriptdir}/pkg_resources
186 %{py3_sitescriptdir}/setuptools
187 %{py3_sitescriptdir}/easy_install.py
188 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
189 %endif
190
191 %files -n easy_install
192 %defattr(644,root,root,755)
193 %attr(755,root,root) %{_bindir}/easy_install
194
195 %if %{with apidocs}
196 %files apidocs
197 %defattr(644,root,root,755)
198 %doc docs/build/html/{_static,*.html,*.js}
199 %endif
This page took 0.083087 seconds and 3 git commands to generate.