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