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