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

Revision 12469, 8.2 KB checked in by tomop, 4 years ago (diff)

python-3.8.5 and related packages.

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