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