python-setuptools-vl.spec 7.7 KB

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