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