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