1 | %if %{?_dist_release} == "vl6" |
---|
2 | %bcond_with python3 |
---|
3 | %else |
---|
4 | %bcond_without python3 |
---|
5 | %endif |
---|
6 | |
---|
7 | %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} |
---|
8 | |
---|
9 | %if %{with python3} |
---|
10 | %{!?python3_sitelib: %global python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} |
---|
11 | %{!?python3_version: %global python3_version %(python3 -c "import sys; sys.stdout.write(sys.version[:3])")} |
---|
12 | %endif |
---|
13 | |
---|
14 | Name: python-setuptools |
---|
15 | Version: 25.1.1 |
---|
16 | Release: 1%{?_dist_release} |
---|
17 | Summary: Download, build, install, upgrade, and uninstall Python packages |
---|
18 | Summary(ja): Python パッケージのダウンロード、ビルド、インストール、アップグレードおよびアンインストール用ツール |
---|
19 | Group: Development/Tools |
---|
20 | License: PSFL/ZPL |
---|
21 | URL: https://pypi.python.org/pypi/setuptools |
---|
22 | Source0: https://pypi.python.org/packages/source/s/setuptools/setuptools-%{version}.tar.gz |
---|
23 | Source1: psfl.txt |
---|
24 | Source2: zpl.txt |
---|
25 | Patch0: add-setter-for-test_args.patch |
---|
26 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
27 | |
---|
28 | Requires(post): alternatives |
---|
29 | BuildArch: noarch |
---|
30 | BuildRequires: python-devel |
---|
31 | |
---|
32 | %description |
---|
33 | setuptools is a collection of enhancements to the Python distutils that allow |
---|
34 | you to more easily build and distribute Python packages, especially ones that |
---|
35 | have dependencies on other packages. |
---|
36 | |
---|
37 | %description -l ja |
---|
38 | setuptools は Python distutils の拡張機能を集めたツールです。 |
---|
39 | このツールにより Python パッケージの構築や配布が簡単に行えるように |
---|
40 | なります。特に他のパッケージに依存しているパッケージを扱う際に便利 |
---|
41 | です。 |
---|
42 | |
---|
43 | %if %{with python3} |
---|
44 | |
---|
45 | %package -n python3-setuptools |
---|
46 | Summary: Download, build, install, upgrade, and uninstall Python3 packages |
---|
47 | Summary(ja): Python3 パッケージのダウンロード、ビルド、インストール、アップグレードおよびアンインストール用ツール |
---|
48 | Group: Development/Tools |
---|
49 | |
---|
50 | BuildRequires: python3-devel |
---|
51 | Requires(post): alternatives |
---|
52 | |
---|
53 | %description -n python3-setuptools |
---|
54 | setuptools is a collection of enhancements to the Python distutils that allow |
---|
55 | you to more easily build and distribute Python packages, especially ones that |
---|
56 | have dependencies on other packages. |
---|
57 | |
---|
58 | %description -n python3-setuptools -l ja |
---|
59 | setuptools は Python distutils の拡張機能を集めたツールです。 |
---|
60 | このツールにより Python パッケージの構築や配布が簡単に行えるように |
---|
61 | なります。特に他のパッケージに依存しているパッケージを扱う際に便利 |
---|
62 | です。 |
---|
63 | |
---|
64 | %endif |
---|
65 | |
---|
66 | %prep |
---|
67 | %setup -T -c -n setuptools-%{version} |
---|
68 | mkdir py2 |
---|
69 | pushd py2 |
---|
70 | tar xvf %{SOURCE0} |
---|
71 | pushd setuptools-%{version} |
---|
72 | %patch0 -p1 |
---|
73 | #find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python}|' |
---|
74 | cp *.rst ../../ |
---|
75 | popd |
---|
76 | popd |
---|
77 | |
---|
78 | %if %{with python3} |
---|
79 | cp -a py2 py3 |
---|
80 | %endif |
---|
81 | |
---|
82 | %build |
---|
83 | pushd py2/setuptools-%{version} |
---|
84 | CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build |
---|
85 | popd |
---|
86 | |
---|
87 | %if %{with python3} |
---|
88 | pushd py3/setuptools-%{version} |
---|
89 | CFLAGS="$RPM_OPT_FLAGS" python3 setup.py build |
---|
90 | popd |
---|
91 | %endif |
---|
92 | |
---|
93 | %install |
---|
94 | rm -rf $RPM_BUILD_ROOT |
---|
95 | pushd py2/setuptools-%{version} |
---|
96 | %{__python} setup.py install -O1 --skip-build \ |
---|
97 | --root $RPM_BUILD_ROOT \ |
---|
98 | --single-version-externally-managed |
---|
99 | install -p -m 0644 %{SOURCE1} %{SOURCE2} . |
---|
100 | find $RPM_BUILD_ROOT%{python_sitelib} -name '*.exe' | xargs rm -f |
---|
101 | |
---|
102 | # for alternatives |
---|
103 | %__rm -f $RPM_BUILD_ROOT%{_bindir}/easy_install |
---|
104 | popd |
---|
105 | |
---|
106 | %if %{with python3} |
---|
107 | pushd py3/setuptools-%{version} |
---|
108 | python3 setup.py install -O1 --skip-build \ |
---|
109 | --root $RPM_BUILD_ROOT \ |
---|
110 | --single-version-externally-managed |
---|
111 | install -p -m 0644 %{SOURCE1} %{SOURCE2} . |
---|
112 | find $RPM_BUILD_ROOT%{python3_sitelib} -name '*.exe' | xargs rm -f |
---|
113 | |
---|
114 | # for alternatives |
---|
115 | %__rm -f $RPM_BUILD_ROOT%{_bindir}/easy_install |
---|
116 | popd |
---|
117 | %endif |
---|
118 | |
---|
119 | %clean |
---|
120 | rm -rf $RPM_BUILD_ROOT |
---|
121 | |
---|
122 | %pre |
---|
123 | if [ ! -L %{_bindir}/easy_install ]; then |
---|
124 | rm -f %{_bindir}/easy_install |
---|
125 | fi |
---|
126 | |
---|
127 | %post |
---|
128 | update-alternatives --install %{_bindir}/easy_install easy_install \ |
---|
129 | %{_bindir}/easy_install-%{python_version} 30 |
---|
130 | |
---|
131 | %triggerpostun -- python-setuptools < 5.4.2-2 |
---|
132 | update-alternatives --auto easy_install |
---|
133 | |
---|
134 | %preun |
---|
135 | if [ "$1" = "0" ] |
---|
136 | then |
---|
137 | update-alternatives --remove easy_install %{_bindir}/easy_install-%{python_version} |
---|
138 | fi |
---|
139 | |
---|
140 | %if %{with python3} |
---|
141 | |
---|
142 | %pre -n python3-setuptools |
---|
143 | if [ ! -L %{_bindir}/easy_install ]; then |
---|
144 | rm -f %{_bindir}/easy_install |
---|
145 | fi |
---|
146 | |
---|
147 | %post -n python3-setuptools |
---|
148 | update-alternatives --install %{_bindir}/easy_install easy_install \ |
---|
149 | %{_bindir}/easy_install-%{python3_version} 20 |
---|
150 | |
---|
151 | %preun -n python3-setuptools |
---|
152 | if [ "$1" = "0" ] |
---|
153 | then |
---|
154 | update-alternatives --remove easy_install %{_bindir}/easy_install-%{python3_version} |
---|
155 | fi |
---|
156 | |
---|
157 | %endif |
---|
158 | |
---|
159 | %files |
---|
160 | %defattr(-,root,root,-) |
---|
161 | %doc *.rst |
---|
162 | %{_bindir}/easy_install-%{python_version} |
---|
163 | %{python_sitelib}/* |
---|
164 | |
---|
165 | %if %{with python3} |
---|
166 | %files -n python3-setuptools |
---|
167 | %defattr(-,root,root,-) |
---|
168 | %doc *.rst |
---|
169 | %{_bindir}/easy_install-%{python3_version} |
---|
170 | %{python3_sitelib}/* |
---|
171 | %endif |
---|
172 | |
---|
173 | %changelog |
---|
174 | * Sat Jul 30 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 25.1.1-1 |
---|
175 | - new upstream release. |
---|
176 | - enable to build on Vine6. |
---|
177 | |
---|
178 | * Tue Jun 28 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 18.5-3 |
---|
179 | - rebuild with python3-3.5.2 |
---|
180 | |
---|
181 | * Thu Dec 24 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 18.5-2 |
---|
182 | - added a subpackage: python3-setuptools. |
---|
183 | |
---|
184 | * Sun Nov 15 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 18.5-1 |
---|
185 | - new upstream release. |
---|
186 | - imported patch0 from rawhide. |
---|
187 | |
---|
188 | * Mon Mar 9 2015 IWAI, Masaharu <iwaim.sub@gmail.com> - 5.4.2-2 |
---|
189 | - alternatives for easy_install |
---|
190 | |
---|
191 | * Fri Aug 08 2014 Toshiharu Kudoh <toshi.kd2@gmail.com> 5.4.2-1 |
---|
192 | - new upstream release |
---|
193 | |
---|
194 | * Sat Jul 26 2014 Toshiharu Kudoh <toshi.kd2@gmail.com> 5.4.1-1 |
---|
195 | - new upstream release |
---|
196 | |
---|
197 | * Sun Jul 06 2014 Toshiharu Kudoh <toshi.kd2@gmail.com> 5.4-1 |
---|
198 | - new upstream release |
---|
199 | |
---|
200 | * Sat Apr 26 2014 Toshiharu Kudoh <toshi.kd2@gmail.com> 3.4.4-1 |
---|
201 | - new upstream release |
---|
202 | |
---|
203 | * Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.6c11-2 |
---|
204 | - rebuild with python-2.7.2 |
---|
205 | |
---|
206 | * Tue Feb 02 2010 Shu KONNO <owa@bg.wakwak.com> 0.6c11-1 |
---|
207 | - new upstream release |
---|
208 | |
---|
209 | * Tue Feb 02 2010 Shu KONNO <owa@bg.wakwak.com> 0.6c9-2 |
---|
210 | - rebuild with python-2.6 |
---|
211 | |
---|
212 | * Sun Dec 07 2008 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.6c9-1 |
---|
213 | - new upstream release |
---|
214 | - add japanese summary and description |
---|
215 | |
---|
216 | * Mon Jul 21 2008 Shu KONNO <owa@bg.wakwak.com> - 0.6c3-1vl5 |
---|
217 | - rebuilt with python-2.5.2 |
---|
218 | - applied new versioning policy |
---|
219 | |
---|
220 | * Sat Nov 25 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 0.6c3-1vl2 |
---|
221 | - rebuilt for Vine Linux 4.0 |
---|
222 | - changed Group to Development/Tools |
---|
223 | |
---|
224 | * Wed Nov 15 2006 Susumu Tanimura <stanimura-ngs@umin.ac.jp> |
---|
225 | - Refurbished for VineLinux3.2 |
---|
226 | |
---|
227 | * Tue Sep 12 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.6c2-1 |
---|
228 | - Upstream 0.6c2 |
---|
229 | - Ghostbusting |
---|
230 | |
---|
231 | * Mon Jul 31 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.6c1-2 |
---|
232 | - Set perms on license files (#200768) |
---|
233 | |
---|
234 | * Sat Jul 22 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.6c1-1 |
---|
235 | - Version 0.6c1 |
---|
236 | |
---|
237 | * Wed Jun 28 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.6b3-1 |
---|
238 | - Taking over from Ignacio |
---|
239 | - Version 0.6b3 |
---|
240 | - Ghost .pyo files in sitelib |
---|
241 | - Add license files |
---|
242 | - Remove manual python-abi, since we're building FC4 and up |
---|
243 | - Kill .exe files |
---|
244 | |
---|
245 | * Wed Feb 15 2006 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0.6a10-1 |
---|
246 | - Upstream update |
---|
247 | |
---|
248 | * Mon Jan 16 2006 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0.6a9-1 |
---|
249 | - Upstream update |
---|
250 | |
---|
251 | * Sat Dec 24 2005 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0.6a8-1 |
---|
252 | - Initial RPM release |
---|