python2-setuptools-vl.spec 6.8 KB

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