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