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.

RevLine 
[12469]1%bcond_without bootstrap
[9903]2%bcond_without python3
[521]3
[11271]4%global srcname setuptools
5%define _unpackaged_files_terminate_build 1
[9903]6
[11271]7%global python_wheelname %{srcname}-%{version}-py2.py3-none-any.whl
[9903]8%if %{with python3}
[11271]9%global python3_wheelname %python_wheelname
10%global python3_record %{python3_sitelib}/%{srcname}-%{version}.dist-info/RECORD
[9903]11%endif
12
[521]13Name:           python-setuptools
[12469]14Version:        49.6.0
[10733]15Release:        1%{?_dist_release}
[521]16Summary:        Download, build, install, upgrade, and uninstall Python packages
17Summary(ja):     Python パッケージのダウンロード、ビルド、インストール、アップグレードおよびアンインストール用ツール
[12469]18Group:          programming
[521]19License:        PSFL/ZPL
[8384]20URL:            https://pypi.python.org/pypi/setuptools
[11271]21Source0:        https://files.pythonhosted.org/packages/source/s/%{srcname}/%{srcname}-%{version}.zip
[521]22Source1:        psfl.txt
23Source2:        zpl.txt
24BuildRoot:      %{_tmppath}/%{name}-%{version}-root
25
26BuildArch:      noarch
[11271]27BuildRequires:  python-rpm-macros
28%if %{with python3}
[12469]29BuildRequires:  python3
30BuildRequires:  python3-devel
[11271]31BuildRequires:  python3-rpm-macros
32%if %{without bootstrap}
33BuildRequires:  python3-pip
34BuildRequires:  python3-wheel
35%endif # without bootstrap
[12469]36%endif # with python3
[521]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
[12469]50%if %{with python3}
51%package -n     python3-setuptools
[9903]52Summary:        Download, build, install, upgrade, and uninstall Python3 packages
[12469]53Summary(ja):    Python3 パッケージのダウンロード、ビルド、インストール、アップグレードおよびアンインストール用ツール
54Group:          programming
55Requires(post,postun): alternatives
[9903]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
[12469]69
[521]70%prep
[11271]71%setup -q -n %{srcname}-%{version}
[521]72
[11271]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
[521]84
[11271]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
[521]92%build
[9903]93%if %{with python3}
[11271]94%if %{without bootstrap}
95%py3_build_wheel
96%else
97%py3_build
[9903]98%endif
[11271]99%endif # with python3
[521]100
101%install
[11271]102rm -rf %{buildroot}
[521]103
[11271]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).
[9903]107%if %{with python3}
[11271]108%if %{without bootstrap}
109%py3_install_wheel %{python3_wheelname}
[9903]110
[11271]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
[9903]115%endif
116
[11271]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
[12469]131
[521]132%clean
133rm -rf $RPM_BUILD_ROOT
134
[10733]135
[9903]136%if %{with python3}
[10733]137%pre -n python3-setuptools
138if [ ! -L %{_bindir}/easy_install ]; then
139  rm -f %{_bindir}/easy_install
140fi
141
[9903]142%post -n python3-setuptools
[12469]143/sbin/update-alternatives \
144  --install %{_bindir}/easy_install easy_install \
145  %{_bindir}/easy_install-%{python3_version} %{python3_version_nodots}
[9903]146
147%preun -n python3-setuptools
[12469]148if [ "$1" = "0" ]; then
149  /sbin/update-alternatives \
150    --remove easy_install %{_bindir}/easy_install-%{python3_version}
[9903]151fi
152%endif
153
154%if %{with python3}
155%files -n python3-setuptools
[11271]156%license LICENSE
157%doc docs/* CHANGES.rst README.rst
158%{python3_sitelib}/easy_install.py
[12469]159%{python3_sitelib}/distutils-precedence.pth
[11271]160%{python3_sitelib}/pkg_resources/
161%{python3_sitelib}/setuptools*/
162%{python3_sitelib}/__pycache__/*
[12469]163%{python3_sitelib}/_distutils_hack
[11271]164%{_bindir}/easy_install-3*
[9903]165%endif
[521]166
[12469]167
[521]168%changelog
[12469]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
[12367]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
[11271]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
[10733]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
[10405]185* Tue Jun 28 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 18.5-3
186- rebuild with python3-3.5.2
187
[9903]188* Thu Dec 24 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 18.5-2
189- added a subpackage: python3-setuptools.
190
[9818]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
[9418]195* Mon Mar  9 2015 IWAI, Masaharu <iwaim.sub@gmail.com> - 5.4.2-2
196- alternatives for easy_install
197
[8896]198* Fri Aug 08 2014 Toshiharu Kudoh <toshi.kd2@gmail.com> 5.4.2-1
199- new upstream release
200
[8863]201* Sat Jul 26 2014 Toshiharu Kudoh <toshi.kd2@gmail.com> 5.4.1-1
202- new upstream release
203
[8746]204* Sun Jul 06 2014 Toshiharu Kudoh <toshi.kd2@gmail.com> 5.4-1
205- new upstream release
206
[8384]207* Sat Apr 26 2014 Toshiharu Kudoh <toshi.kd2@gmail.com> 3.4.4-1
208- new upstream release
[8158]209
[5701]210* Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.6c11-2
211- rebuild with python-2.7.2
212
[521]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.