source: projects/specs/trunk/p/python-setuptools/python-setuptools-vl.spec @ 9903

Revision 9903, 7.0 KB checked in by tomop, 8 years ago (diff)

python-setuptools-18.5-2

Line 
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
10Name:           python-setuptools
11Version:        18.5
12Release:        2%{?_dist_release}
13Summary:        Download, build, install, upgrade, and uninstall Python packages
14Summary(ja):     Python パッケージのダウンロード、ビルド、インストール、アップグレードおよびアンインストール用ツール
15Group:          Development/Tools
16License:        PSFL/ZPL
17URL:            https://pypi.python.org/pypi/setuptools
18Source0:        https://pypi.python.org/packages/source/s/setuptools/setuptools-%{version}.tar.gz
19Source1:        psfl.txt
20Source2:        zpl.txt
21Patch0:         add-setter-for-test_args.patch
22BuildRoot:      %{_tmppath}/%{name}-%{version}-root
23
24Requires(post): alternatives
25BuildArch:      noarch
26BuildRequires:  python-devel
27
28%description
29setuptools is a collection of enhancements to the Python distutils that allow
30you to more easily build and distribute Python packages, especially ones that
31have dependencies on other packages.
32
33%description -l ja
34setuptools は Python distutils の拡張機能を集めたツールです。
35このツールにより Python パッケージの構築や配布が簡単に行えるように
36なります。特に他のパッケージに依存しているパッケージを扱う際に便利
37です。
38
39%if %{with python3}
40
41%package -n python3-setuptools
42Summary:        Download, build, install, upgrade, and uninstall Python3 packages
43Summary(ja):     Python3 パッケージのダウンロード、ビルド、インストール、アップグレードおよびアンインストール用ツール
44Group:          Development/Tools
45
46BuildRequires:  python3-devel
47Requires(post): alternatives
48
49%description -n python3-setuptools
50setuptools is a collection of enhancements to the Python distutils that allow
51you to more easily build and distribute Python packages, especially ones that
52have dependencies on other packages.
53
54%description -n python3-setuptools -l ja
55setuptools は Python distutils の拡張機能を集めたツールです。
56このツールにより Python パッケージの構築や配布が簡単に行えるように
57なります。特に他のパッケージに依存しているパッケージを扱う際に便利
58です。
59
60%endif
61
62%prep
63%setup -T -c -n setuptools-%{version}
64mkdir py2
65pushd py2
66tar xvf %{SOURCE0}
67pushd setuptools-%{version}
68%patch0 -p1
69#find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python}|'
70cp *.txt ../../
71popd
72popd
73
74%if %{with python3}
75cp -a py2 py3
76%endif
77
78%build
79pushd py2/setuptools-%{version}
80CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
81popd
82
83%if %{with python3}
84pushd py3/setuptools-%{version}
85CFLAGS="$RPM_OPT_FLAGS" python3 setup.py build
86popd
87%endif
88
89%install
90rm -rf $RPM_BUILD_ROOT
91pushd py2/setuptools-%{version}
92%{__python} setup.py install -O1 --skip-build \
93    --root $RPM_BUILD_ROOT \
94    --single-version-externally-managed
95install -p -m 0644 %{SOURCE1} %{SOURCE2} .
96find $RPM_BUILD_ROOT%{python_sitelib} -name '*.exe' | xargs rm -f
97
98# for alternatives
99%__rm -f $RPM_BUILD_ROOT%{_bindir}/easy_install
100popd
101
102%if %{with python3}
103pushd py3/setuptools-%{version}
104python3 setup.py install -O1 --skip-build \
105    --root $RPM_BUILD_ROOT \
106    --single-version-externally-managed
107install -p -m 0644 %{SOURCE1} %{SOURCE2} .
108find $RPM_BUILD_ROOT%{python3_sitelib} -name '*.exe' | xargs rm -f
109
110# for alternatives
111%__rm -f $RPM_BUILD_ROOT%{_bindir}/easy_install
112popd
113%endif
114
115%clean
116rm -rf $RPM_BUILD_ROOT
117
118%post
119update-alternatives --install %{_bindir}/easy_install easy_install \
120                              %{_bindir}/easy_install-%{python_version} 30
121
122%triggerpostun -- python-setuptools < 5.4.2-2
123update-alternatives --auto easy_install
124
125%preun
126if [ "$1" = "0" ]
127then
128  update-alternatives --remove easy_install %{_bindir}/easy_install-%{python_version}
129fi
130
131%if %{with python3}
132
133%post -n python3-setuptools
134update-alternatives --install %{_bindir}/easy_install easy_install \
135                              %{_bindir}/easy_install-%{python3_version} 20
136
137%preun -n python3-setuptools
138if [ "$1" = "0" ]
139then
140  update-alternatives --remove easy_install %{_bindir}/easy_install-%{python3_version}
141fi
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
Note: See TracBrowser for help on using the repository browser.