1 | %bcond_without bootstrap |
---|
2 | %bcond_without python3 |
---|
3 | |
---|
4 | %global srcname setuptools |
---|
5 | %define _unpackaged_files_terminate_build 1 |
---|
6 | |
---|
7 | %global python_wheelname %{srcname}-%{version}-py2.py3-none-any.whl |
---|
8 | %if %{with python3} |
---|
9 | %global python3_wheelname %python_wheelname |
---|
10 | %global python3_record %{python3_sitelib}/%{srcname}-%{version}.dist-info/RECORD |
---|
11 | %endif |
---|
12 | |
---|
13 | Name: python-setuptools |
---|
14 | Version: 49.6.0 |
---|
15 | Release: 1%{?_dist_release} |
---|
16 | Summary: Download, build, install, upgrade, and uninstall Python packages |
---|
17 | Summary(ja): Python パッケージのダウンロード、ビルド、インストール、アップグレードおよびアンインストール用ツール |
---|
18 | Group: programming |
---|
19 | License: PSFL/ZPL |
---|
20 | URL: https://pypi.python.org/pypi/setuptools |
---|
21 | Source0: https://files.pythonhosted.org/packages/source/s/%{srcname}/%{srcname}-%{version}.zip |
---|
22 | Source1: psfl.txt |
---|
23 | Source2: zpl.txt |
---|
24 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
25 | |
---|
26 | BuildArch: noarch |
---|
27 | BuildRequires: python-rpm-macros |
---|
28 | %if %{with python3} |
---|
29 | BuildRequires: python3 |
---|
30 | BuildRequires: python3-devel |
---|
31 | BuildRequires: python3-rpm-macros |
---|
32 | %if %{without bootstrap} |
---|
33 | BuildRequires: python3-pip |
---|
34 | BuildRequires: python3-wheel |
---|
35 | %endif # without bootstrap |
---|
36 | %endif # with python3 |
---|
37 | |
---|
38 | %description |
---|
39 | setuptools is a collection of enhancements to the Python distutils that allow |
---|
40 | you to more easily build and distribute Python packages, especially ones that |
---|
41 | have dependencies on other packages. |
---|
42 | |
---|
43 | %description -l ja |
---|
44 | setuptools は Python distutils の拡張機能を集めたツールです。 |
---|
45 | このツールにより Python パッケージの構築や配布が簡単に行えるように |
---|
46 | なります。特に他のパッケージに依存しているパッケージを扱う際に便利 |
---|
47 | です。 |
---|
48 | |
---|
49 | |
---|
50 | %if %{with python3} |
---|
51 | %package -n python3-setuptools |
---|
52 | Summary: Download, build, install, upgrade, and uninstall Python3 packages |
---|
53 | Summary(ja): Python3 パッケージのダウンロード、ビルド、インストール、アップグレードおよびアンインストール用ツール |
---|
54 | Group: programming |
---|
55 | Requires(post,postun): alternatives |
---|
56 | |
---|
57 | %description -n python3-setuptools |
---|
58 | setuptools is a collection of enhancements to the Python distutils that allow |
---|
59 | you to more easily build and distribute Python packages, especially ones that |
---|
60 | have dependencies on other packages. |
---|
61 | |
---|
62 | %description -n python3-setuptools -l ja |
---|
63 | setuptools は Python distutils の拡張機能を集めたツールです。 |
---|
64 | このツールにより Python パッケージの構築や配布が簡単に行えるように |
---|
65 | なります。特に他のパッケージに依存しているパッケージを扱う際に便利 |
---|
66 | です。 |
---|
67 | %endif |
---|
68 | |
---|
69 | |
---|
70 | %prep |
---|
71 | %setup -q -n %{srcname}-%{version} |
---|
72 | |
---|
73 | # We can't remove .egg-info (but it doesn't matter, since it'll be rebuilt): |
---|
74 | # The problem is that to properly execute setuptools' setup.py, |
---|
75 | # it is needed for setuptools to be loaded as a Distribution |
---|
76 | # (with egg-info or .dist-info dir), it's not sufficient |
---|
77 | # to just have them on PYTHONPATH |
---|
78 | # Running "setup.py install" without having setuptools installed |
---|
79 | # as a distribution gives warnings such as |
---|
80 | # ... distutils/dist.py:267: UserWarning: Unknown distribution option: 'entry_points' |
---|
81 | # and doesn't create "easy_install" and .egg-info directory |
---|
82 | # Note: this is only a problem if bootstrapping wheel or building on RHEL, |
---|
83 | # otherwise setuptools are installed as dependency into buildroot |
---|
84 | |
---|
85 | # Strip shbang |
---|
86 | find setuptools -name \*.py | xargs sed -i -e '1 {/^#!\//d}' |
---|
87 | # Remove bundled exes |
---|
88 | rm -f setuptools/*.exe |
---|
89 | # These tests require internet connection |
---|
90 | rm setuptools/tests/test_integration.py |
---|
91 | |
---|
92 | %build |
---|
93 | %if %{with python3} |
---|
94 | %if %{without bootstrap} |
---|
95 | %py3_build_wheel |
---|
96 | %else |
---|
97 | %py3_build |
---|
98 | %endif |
---|
99 | %endif # with python3 |
---|
100 | |
---|
101 | %install |
---|
102 | rm -rf %{buildroot} |
---|
103 | |
---|
104 | # Must do the python3 install first because the scripts in /usr/bin are |
---|
105 | # overwritten with every setup.py install (and we want the python2 version to |
---|
106 | # be the default for now). |
---|
107 | %if %{with python3} |
---|
108 | %if %{without bootstrap} |
---|
109 | %py3_install_wheel %{python3_wheelname} |
---|
110 | |
---|
111 | # Remove /usr/bin/easy_install from the record as later on we delete the file |
---|
112 | sed -i '/\/usr\/bin\/easy_install,/d' %{buildroot}%{python3_record} |
---|
113 | %else |
---|
114 | %py3_install |
---|
115 | %endif |
---|
116 | |
---|
117 | # TODO: we have to remove this by hand now, but it'd be nice if we wouldn't have to |
---|
118 | rm %{buildroot}%{_bindir}/easy_install |
---|
119 | |
---|
120 | rm -rf %{buildroot}%{python3_sitelib}/setuptools/tests |
---|
121 | %if %{without bootstrap} |
---|
122 | sed -i '/^setuptools\/tests\//d' %{buildroot}%{python3_record} |
---|
123 | %endif |
---|
124 | |
---|
125 | find %{buildroot}%{python3_sitelib} -name '*.exe' | xargs rm -f |
---|
126 | %endif # with python3 |
---|
127 | |
---|
128 | # Don't ship these |
---|
129 | rm -r docs/{Makefile,conf.py,_*} |
---|
130 | |
---|
131 | |
---|
132 | %clean |
---|
133 | rm -rf $RPM_BUILD_ROOT |
---|
134 | |
---|
135 | |
---|
136 | %if %{with python3} |
---|
137 | %pre -n python3-setuptools |
---|
138 | if [ ! -L %{_bindir}/easy_install ]; then |
---|
139 | rm -f %{_bindir}/easy_install |
---|
140 | fi |
---|
141 | |
---|
142 | %post -n python3-setuptools |
---|
143 | /sbin/update-alternatives \ |
---|
144 | --install %{_bindir}/easy_install easy_install \ |
---|
145 | %{_bindir}/easy_install-%{python3_version} %{python3_version_nodots} |
---|
146 | |
---|
147 | %preun -n python3-setuptools |
---|
148 | if [ "$1" = "0" ]; then |
---|
149 | /sbin/update-alternatives \ |
---|
150 | --remove easy_install %{_bindir}/easy_install-%{python3_version} |
---|
151 | fi |
---|
152 | %endif |
---|
153 | |
---|
154 | %if %{with python3} |
---|
155 | %files -n python3-setuptools |
---|
156 | %license LICENSE |
---|
157 | %doc docs/* CHANGES.rst README.rst |
---|
158 | %{python3_sitelib}/easy_install.py |
---|
159 | %{python3_sitelib}/distutils-precedence.pth |
---|
160 | %{python3_sitelib}/pkg_resources/ |
---|
161 | %{python3_sitelib}/setuptools*/ |
---|
162 | %{python3_sitelib}/__pycache__/* |
---|
163 | %{python3_sitelib}/_distutils_hack |
---|
164 | %{_bindir}/easy_install-3* |
---|
165 | %endif |
---|
166 | |
---|
167 | |
---|
168 | %changelog |
---|
169 | * Sat Aug 15 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 49.6.0-1 |
---|
170 | - updated to 49.6.0. |
---|
171 | - built with python3 only. |
---|
172 | |
---|
173 | * Wed Apr 08 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 44.1.0-1 |
---|
174 | - updated to 44.1.0 (last release for Python2). |
---|
175 | |
---|
176 | * Sun Dec 17 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 38.2.4-1 |
---|
177 | - new upstream release. |
---|
178 | - dropped Patch0. |
---|
179 | - made to use python{,3}-rpm-macros. |
---|
180 | |
---|
181 | * Sat Jul 30 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 25.1.1-1 |
---|
182 | - new upstream release. |
---|
183 | - enable to build on Vine6. |
---|
184 | |
---|
185 | * Tue Jun 28 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 18.5-3 |
---|
186 | - rebuild with python3-3.5.2 |
---|
187 | |
---|
188 | * Thu Dec 24 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 18.5-2 |
---|
189 | - added a subpackage: python3-setuptools. |
---|
190 | |
---|
191 | * Sun Nov 15 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 18.5-1 |
---|
192 | - new upstream release. |
---|
193 | - imported patch0 from rawhide. |
---|
194 | |
---|
195 | * Mon Mar 9 2015 IWAI, Masaharu <iwaim.sub@gmail.com> - 5.4.2-2 |
---|
196 | - alternatives for easy_install |
---|
197 | |
---|
198 | * Fri Aug 08 2014 Toshiharu Kudoh <toshi.kd2@gmail.com> 5.4.2-1 |
---|
199 | - new upstream release |
---|
200 | |
---|
201 | * Sat Jul 26 2014 Toshiharu Kudoh <toshi.kd2@gmail.com> 5.4.1-1 |
---|
202 | - new upstream release |
---|
203 | |
---|
204 | * Sun Jul 06 2014 Toshiharu Kudoh <toshi.kd2@gmail.com> 5.4-1 |
---|
205 | - new upstream release |
---|
206 | |
---|
207 | * Sat Apr 26 2014 Toshiharu Kudoh <toshi.kd2@gmail.com> 3.4.4-1 |
---|
208 | - new upstream release |
---|
209 | |
---|
210 | * Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.6c11-2 |
---|
211 | - rebuild with python-2.7.2 |
---|
212 | |
---|
213 | * Tue Feb 02 2010 Shu KONNO <owa@bg.wakwak.com> 0.6c11-1 |
---|
214 | - new upstream release |
---|
215 | |
---|
216 | * Tue Feb 02 2010 Shu KONNO <owa@bg.wakwak.com> 0.6c9-2 |
---|
217 | - rebuild with python-2.6 |
---|
218 | |
---|
219 | * Sun Dec 07 2008 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.6c9-1 |
---|
220 | - new upstream release |
---|
221 | - add japanese summary and description |
---|
222 | |
---|
223 | * Mon Jul 21 2008 Shu KONNO <owa@bg.wakwak.com> - 0.6c3-1vl5 |
---|
224 | - rebuilt with python-2.5.2 |
---|
225 | - applied new versioning policy |
---|
226 | |
---|
227 | * Sat Nov 25 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 0.6c3-1vl2 |
---|
228 | - rebuilt for Vine Linux 4.0 |
---|
229 | - changed Group to Development/Tools |
---|
230 | |
---|
231 | * Wed Nov 15 2006 Susumu Tanimura <stanimura-ngs@umin.ac.jp> |
---|
232 | - Refurbished for VineLinux3.2 |
---|
233 | |
---|
234 | * Tue Sep 12 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.6c2-1 |
---|
235 | - Upstream 0.6c2 |
---|
236 | - Ghostbusting |
---|
237 | |
---|
238 | * Mon Jul 31 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.6c1-2 |
---|
239 | - Set perms on license files (#200768) |
---|
240 | |
---|
241 | * Sat Jul 22 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.6c1-1 |
---|
242 | - Version 0.6c1 |
---|
243 | |
---|
244 | * Wed Jun 28 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.6b3-1 |
---|
245 | - Taking over from Ignacio |
---|
246 | - Version 0.6b3 |
---|
247 | - Ghost .pyo files in sitelib |
---|
248 | - Add license files |
---|
249 | - Remove manual python-abi, since we're building FC4 and up |
---|
250 | - Kill .exe files |
---|
251 | |
---|
252 | * Wed Feb 15 2006 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0.6a10-1 |
---|
253 | - Upstream update |
---|
254 | |
---|
255 | * Mon Jan 16 2006 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0.6a9-1 |
---|
256 | - Upstream update |
---|
257 | |
---|
258 | * Sat Dec 24 2005 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0.6a8-1 |
---|
259 | - Initial RPM release |
---|