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

Revision 12545, 7.7 KB checked in by tomop, 3 years ago (diff)

rpm-4.16.1.2-1 and requirements

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