source: projects/specs/branches/6/p/python-setuptools/python-setuptools-vl.spec @ 10727

Revision 10727, 7.4 KB checked in by tomop, 8 years ago (diff)

python-setuptools-25.1.1-1

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