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

Revision 10405, 7.1 KB checked in by Takemikaduchi, 8 years ago (diff)

gcc-5.4.0 & python3-3.5.2

RevLine 
[9903]1%bcond_without python3
[521]2
[9903]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
[521]10Name:           python-setuptools
[9818]11Version:        18.5
[10405]12Release:        3%{?_dist_release}
[521]13Summary:        Download, build, install, upgrade, and uninstall Python packages
14Summary(ja):     Python パッケージのダウンロード、ビルド、インストール、アップグレードおよびアンインストール用ツール
15Group:          Development/Tools
16License:        PSFL/ZPL
[8384]17URL:            https://pypi.python.org/pypi/setuptools
18Source0:        https://pypi.python.org/packages/source/s/setuptools/setuptools-%{version}.tar.gz
[521]19Source1:        psfl.txt
20Source2:        zpl.txt
[9818]21Patch0:         add-setter-for-test_args.patch
[521]22BuildRoot:      %{_tmppath}/%{name}-%{version}-root
23
[9418]24Requires(post): alternatives
[521]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
[9903]39%if %{with python3}
[521]40
[9903]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
[521]62%prep
[9903]63%setup -T -c -n setuptools-%{version}
64mkdir py2
65pushd py2
66tar xvf %{SOURCE0}
67pushd setuptools-%{version}
[9818]68%patch0 -p1
[8384]69#find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python}|'
[9903]70cp *.txt ../../
71popd
72popd
[521]73
[9903]74%if %{with python3}
75cp -a py2 py3
76%endif
[521]77
78%build
[9903]79pushd py2/setuptools-%{version}
[521]80CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
[9903]81popd
[521]82
[9903]83%if %{with python3}
84pushd py3/setuptools-%{version}
85CFLAGS="$RPM_OPT_FLAGS" python3 setup.py build
86popd
87%endif
[521]88
89%install
90rm -rf $RPM_BUILD_ROOT
[9903]91pushd py2/setuptools-%{version}
[521]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
[9418]98# for alternatives
99%__rm -f $RPM_BUILD_ROOT%{_bindir}/easy_install
[9903]100popd
[521]101
[9903]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
[521]115%clean
116rm -rf $RPM_BUILD_ROOT
117
[9418]118%post
119update-alternatives --install %{_bindir}/easy_install easy_install \
120                              %{_bindir}/easy_install-%{python_version} 30
[521]121
[9418]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
[9903]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
[521]145%files
146%defattr(-,root,root,-)
147%doc *.txt
[9418]148%{_bindir}/easy_install-%{python_version}
[521]149%{python_sitelib}/*
150
[9903]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
[521]158
159%changelog
[10405]160* Tue Jun 28 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 18.5-3
161- rebuild with python3-3.5.2
162
[9903]163* Thu Dec 24 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 18.5-2
164- added a subpackage: python3-setuptools.
165
[9818]166* Sun Nov 15 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 18.5-1
167- new upstream release.
168- imported patch0 from rawhide.
169
[9418]170* Mon Mar  9 2015 IWAI, Masaharu <iwaim.sub@gmail.com> - 5.4.2-2
171- alternatives for easy_install
172
[8896]173* Fri Aug 08 2014 Toshiharu Kudoh <toshi.kd2@gmail.com> 5.4.2-1
174- new upstream release
175
[8863]176* Sat Jul 26 2014 Toshiharu Kudoh <toshi.kd2@gmail.com> 5.4.1-1
177- new upstream release
178
[8746]179* Sun Jul 06 2014 Toshiharu Kudoh <toshi.kd2@gmail.com> 5.4-1
180- new upstream release
181
[8384]182* Sat Apr 26 2014 Toshiharu Kudoh <toshi.kd2@gmail.com> 3.4.4-1
183- new upstream release
[8158]184
[5701]185* Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.6c11-2
186- rebuild with python-2.7.2
187
[521]188* Tue Feb 02 2010 Shu KONNO <owa@bg.wakwak.com> 0.6c11-1
189- new upstream release
190
191* Tue Feb 02 2010 Shu KONNO <owa@bg.wakwak.com> 0.6c9-2
192- rebuild with python-2.6
193
194* Sun Dec 07 2008 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.6c9-1
195- new upstream release
196- add japanese summary and description
197
198* Mon Jul 21 2008 Shu KONNO <owa@bg.wakwak.com> - 0.6c3-1vl5
199- rebuilt with python-2.5.2
200- applied new versioning policy
201
202* Sat Nov 25 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 0.6c3-1vl2
203- rebuilt for Vine Linux 4.0
204- changed Group to Development/Tools
205
206* Wed Nov 15 2006 Susumu Tanimura <stanimura-ngs@umin.ac.jp>
207- Refurbished for VineLinux3.2
208
209* Tue Sep 12 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.6c2-1
210- Upstream 0.6c2
211- Ghostbusting
212
213* Mon Jul 31 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.6c1-2
214- Set perms on license files (#200768)
215
216* Sat Jul 22 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.6c1-1
217- Version 0.6c1
218
219* Wed Jun 28 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.6b3-1
220- Taking over from Ignacio
221- Version 0.6b3
222- Ghost .pyo files in sitelib
223- Add license files
224- Remove manual python-abi, since we're building FC4 and up
225- Kill .exe files
226
227* Wed Feb 15 2006 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0.6a10-1
228- Upstream update
229
230* Mon Jan 16 2006 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0.6a9-1
231- Upstream update
232
233* Sat Dec 24 2005 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0.6a8-1
234- Initial RPM release
Note: See TracBrowser for help on using the repository browser.