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

Revision 12367, 9.2 KB checked in by tomop, 4 years ago (diff)

updated 5 packages

krb5-1.18-1

python-pip-20.0.2-1

python-requests-2.23.0-1

python-rpm-macros-3.8-1

python-setuptools-44.1.0-1

Line 
1%bcond_with bootstrap
2%bcond_without python3
3
4%global srcname setuptools
5%define _unpackaged_files_terminate_build 1
6
7%global python_wheelname %{srcname}-%{version}-py2.py3-none-any.whl
8%global python2_wheelname %python_wheelname
9%global python2_record %{python_sitelib}/%{srcname}-%{version}.dist-info/RECORD
10%if %{with python3}
11%global python3_wheelname %python_wheelname
12%global python3_record %{python3_sitelib}/%{srcname}-%{version}.dist-info/RECORD
13%endif
14
15Name:           python-setuptools
16Version:        44.1.0
17Release:        1%{?_dist_release}
18Summary:        Download, build, install, upgrade, and uninstall Python packages
19Summary(ja):     Python パッケージのダウンロード、ビルド、インストール、アップグレードおよびアンインストール用ツール
20Group:          Development/Tools
21License:        PSFL/ZPL
22URL:            https://pypi.python.org/pypi/setuptools
23Source0:        https://files.pythonhosted.org/packages/source/s/%{srcname}/%{srcname}-%{version}.zip
24Source1:        psfl.txt
25Source2:        zpl.txt
26BuildRoot:      %{_tmppath}/%{name}-%{version}-root
27
28Requires(post): alternatives
29BuildArch:      noarch
30BuildRequires:  python-devel
31BuildRequires:  python-rpm-macros
32%if %{with python3}
33BuildRequires:  python3-rpm-macros
34%endif
35%if %{without bootstrap}
36BuildRequires:  python-pip
37BuildRequires:  python-wheel
38%if %{with python3}
39BuildRequires:  python3-pip
40BuildRequires:  python3-wheel
41%endif
42%endif # without bootstrap
43
44%description
45setuptools is a collection of enhancements to the Python distutils that allow
46you to more easily build and distribute Python packages, especially ones that
47have dependencies on other packages.
48
49%description -l ja
50setuptools は Python distutils の拡張機能を集めたツールです。
51このツールにより Python パッケージの構築や配布が簡単に行えるように
52なります。特に他のパッケージに依存しているパッケージを扱う際に便利
53です。
54
55%if %{with python3}
56
57%package -n python3-setuptools
58Summary:        Download, build, install, upgrade, and uninstall Python3 packages
59Summary(ja):     Python3 パッケージのダウンロード、ビルド、インストール、アップグレードおよびアンインストール用ツール
60Group:          Development/Tools
61
62BuildRequires:  python3-devel
63Requires(post): alternatives
64
65%description -n python3-setuptools
66setuptools is a collection of enhancements to the Python distutils that allow
67you to more easily build and distribute Python packages, especially ones that
68have dependencies on other packages.
69
70%description -n python3-setuptools -l ja
71setuptools は Python distutils の拡張機能を集めたツールです。
72このツールにより Python パッケージの構築や配布が簡単に行えるように
73なります。特に他のパッケージに依存しているパッケージを扱う際に便利
74です。
75
76%endif
77
78%prep
79%setup -q -n %{srcname}-%{version}
80
81# We can't remove .egg-info (but it doesn't matter, since it'll be rebuilt):
82#  The problem is that to properly execute setuptools' setup.py,
83#   it is needed for setuptools to be loaded as a Distribution
84#   (with egg-info or .dist-info dir), it's not sufficient
85#   to just have them on PYTHONPATH
86#  Running "setup.py install" without having setuptools installed
87#   as a distribution gives warnings such as
88#    ... distutils/dist.py:267: UserWarning: Unknown distribution option: 'entry_points'
89#   and doesn't create "easy_install" and .egg-info directory
90# Note: this is only a problem if bootstrapping wheel or building on RHEL,
91#  otherwise setuptools are installed as dependency into buildroot
92
93# Strip shbang
94find setuptools -name \*.py | xargs sed -i -e '1 {/^#!\//d}'
95# Remove bundled exes
96rm -f setuptools/*.exe
97# These tests require internet connection
98rm setuptools/tests/test_integration.py
99
100%build
101%if %{without bootstrap}
102%py_build_wheel
103%else
104%py_build
105%endif
106
107%if %{with python3}
108%if %{without bootstrap}
109%py3_build_wheel
110%else
111%py3_build
112%endif
113%endif # with python3
114
115%install
116rm -rf %{buildroot}
117
118# Must do the python3 install first because the scripts in /usr/bin are
119# overwritten with every setup.py install (and we want the python2 version to
120# be the default for now).
121%if %{with python3}
122%if %{without bootstrap}
123%py3_install_wheel %{python3_wheelname}
124
125# Remove /usr/bin/easy_install from the record as later on we delete the file
126sed -i '/\/usr\/bin\/easy_install,/d' %{buildroot}%{python3_record}
127%else
128%py3_install
129%endif
130
131# TODO: we have to remove this by hand now, but it'd be nice if we wouldn't have to
132rm %{buildroot}%{_bindir}/easy_install
133
134rm -rf %{buildroot}%{python3_sitelib}/setuptools/tests
135%if %{without bootstrap}
136sed -i '/^setuptools\/tests\//d' %{buildroot}%{python3_record}
137%endif
138
139find %{buildroot}%{python3_sitelib} -name '*.exe' | xargs rm -f
140%endif # with python3
141
142
143%if %{without bootstrap}
144%py_install_wheel %{python2_wheelname}
145%else
146%py_install
147%endif
148
149rm -rf %{buildroot}%{python_sitelib}/setuptools/tests
150%if %{without bootstrap}
151sed -i '/^setuptools\/tests\//d' %{buildroot}%{python2_record}
152%endif
153
154find %{buildroot}%{python_sitelib} -name '*.exe' | xargs rm -f
155
156# Don't ship these
157rm -r docs/{Makefile,conf.py,_*}
158rm %{buildroot}%{_bindir}/easy_install
159
160%clean
161rm -rf $RPM_BUILD_ROOT
162
163%pre
164if [ ! -L %{_bindir}/easy_install ]; then
165  rm -f %{_bindir}/easy_install
166fi
167
168%post
169update-alternatives --install %{_bindir}/easy_install easy_install \
170                              %{_bindir}/easy_install-%{python_version} 30
171
172%triggerpostun -- python-setuptools < 5.4.2-2
173update-alternatives --auto easy_install
174
175%preun
176if [ "$1" = "0" ]
177then
178  update-alternatives --remove easy_install %{_bindir}/easy_install-%{python_version}
179fi
180
181%if %{with python3}
182
183%pre -n python3-setuptools
184if [ ! -L %{_bindir}/easy_install ]; then
185  rm -f %{_bindir}/easy_install
186fi
187
188%post -n python3-setuptools
189update-alternatives --install %{_bindir}/easy_install easy_install \
190                              %{_bindir}/easy_install-%{python3_version} 20
191
192%preun -n python3-setuptools
193if [ "$1" = "0" ]
194then
195  update-alternatives --remove easy_install %{_bindir}/easy_install-%{python3_version}
196fi
197
198%endif
199
200%files
201%defattr(-,root,root,-)
202%license LICENSE
203%doc docs/* CHANGES.rst README.rst
204%{python_sitelib}/*
205%{_bindir}/easy_install-2*
206
207%if %{with python3}
208%files -n python3-setuptools
209%license LICENSE
210%doc docs/* CHANGES.rst README.rst
211%{python3_sitelib}/easy_install.py
212%{python3_sitelib}/pkg_resources/
213%{python3_sitelib}/setuptools*/
214%{python3_sitelib}/__pycache__/*
215%{_bindir}/easy_install-3*
216%endif
217
218%changelog
219* Wed Apr 08 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 44.1.0-1
220- updated to 44.1.0 (last release for Python2).
221
222* Sun Dec 17 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 38.2.4-1
223- new upstream release.
224- dropped Patch0.
225- made to use python{,3}-rpm-macros.
226
227* Sat Jul 30 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 25.1.1-1
228- new upstream release.
229- enable to build on Vine6.
230
231* Tue Jun 28 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 18.5-3
232- rebuild with python3-3.5.2
233
234* Thu Dec 24 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 18.5-2
235- added a subpackage: python3-setuptools.
236
237* Sun Nov 15 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 18.5-1
238- new upstream release.
239- imported patch0 from rawhide.
240
241* Mon Mar  9 2015 IWAI, Masaharu <iwaim.sub@gmail.com> - 5.4.2-2
242- alternatives for easy_install
243
244* Fri Aug 08 2014 Toshiharu Kudoh <toshi.kd2@gmail.com> 5.4.2-1
245- new upstream release
246
247* Sat Jul 26 2014 Toshiharu Kudoh <toshi.kd2@gmail.com> 5.4.1-1
248- new upstream release
249
250* Sun Jul 06 2014 Toshiharu Kudoh <toshi.kd2@gmail.com> 5.4-1
251- new upstream release
252
253* Sat Apr 26 2014 Toshiharu Kudoh <toshi.kd2@gmail.com> 3.4.4-1
254- new upstream release
255
256* Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.6c11-2
257- rebuild with python-2.7.2
258
259* Tue Feb 02 2010 Shu KONNO <owa@bg.wakwak.com> 0.6c11-1
260- new upstream release
261
262* Tue Feb 02 2010 Shu KONNO <owa@bg.wakwak.com> 0.6c9-2
263- rebuild with python-2.6
264
265* Sun Dec 07 2008 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.6c9-1
266- new upstream release
267- add japanese summary and description
268
269* Mon Jul 21 2008 Shu KONNO <owa@bg.wakwak.com> - 0.6c3-1vl5
270- rebuilt with python-2.5.2
271- applied new versioning policy
272
273* Sat Nov 25 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 0.6c3-1vl2
274- rebuilt for Vine Linux 4.0
275- changed Group to Development/Tools
276
277* Wed Nov 15 2006 Susumu Tanimura <stanimura-ngs@umin.ac.jp>
278- Refurbished for VineLinux3.2
279
280* Tue Sep 12 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.6c2-1
281- Upstream 0.6c2
282- Ghostbusting
283
284* Mon Jul 31 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.6c1-2
285- Set perms on license files (#200768)
286
287* Sat Jul 22 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.6c1-1
288- Version 0.6c1
289
290* Wed Jun 28 2006 Konstantin Ryabitsev <icon@fedoraproject.org> - 0.6b3-1
291- Taking over from Ignacio
292- Version 0.6b3
293- Ghost .pyo files in sitelib
294- Add license files
295- Remove manual python-abi, since we're building FC4 and up
296- Kill .exe files
297
298* Wed Feb 15 2006 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0.6a10-1
299- Upstream update
300
301* Mon Jan 16 2006 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0.6a9-1
302- Upstream update
303
304* Sat Dec 24 2005 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 0.6a8-1
305- Initial RPM release
Note: See TracBrowser for help on using the repository browser.