python2-setuptools-vl.spec 6.7 KB

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