python-pip-vl.spec 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. %bcond_with bootstrap
  2. %bcond_without python3
  3. %global srcname pip
  4. %global python_wheelname %{srcname}-%{version}-py3-none-any.whl
  5. %if %{without bootstrap}
  6. %if %{with python3}
  7. %global python3_wheelname %python_wheelname
  8. %endif
  9. %endif
  10. Summary: Pip installs Python packages. An easy_install replacement
  11. Summary(ja): Pip は easy_install を置き換える Python パッケージインストーラです。
  12. Name: python-%{srcname}
  13. Version: 21.3.1
  14. Release: 1%{?_dist_release}
  15. Group: programming
  16. Vendor: Project Vine
  17. Distribution: Vine Linux
  18. License: MIT
  19. URL: https://pip.pypa.io/en/stable/
  20. Source0: https://pypi.python.org/packages/source/p/pip/%{srcname}-%{version}.tar.gz
  21. # # Patch until the following issue gets implemented upstream:
  22. # # https://github.com/pypa/pip/issues/1351
  23. # Patch0: allow-stripping-given-prefix-from-wheel-RECORD-files.patch
  24. # # Downstream only patch
  25. # # Emit a warning to the user if pip install is run with root privileges
  26. # # Issue upstream: https://github.com/pypa/pip/issues/4288
  27. # Patch1: emit-a-warning-when-running-with-root-privileges.patch
  28. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
  29. BuildArch: noarch
  30. BuildRequires: python-rpm-macros
  31. %if %{with python3}
  32. BuildRequires: python3-rpm-macros
  33. BuildRequires: python3-devel
  34. BuildRequires: python3-setuptools
  35. %if %{without bootstrap}
  36. BuildRequires: python3-pip
  37. BuildRequires: python3-wheel
  38. %endif
  39. %endif
  40. %description
  41. pip is a package management system used to install and manage software packages
  42. written in Python. Many packages can be found in the Python Package Index
  43. (PyPI). pip is a recursive acronym that can stand for either "Pip Installs
  44. Packages" or "Pip Installs Python".
  45. %if %{with python3}
  46. %package -n python3-%{srcname}
  47. Summary: A tool for installing and managing Python3 packages
  48. Group: programming
  49. Requires: python3-setuptools
  50. Requires(post,postun): alternatives
  51. %description -n python3-%{srcname}
  52. pip is a package management system used to install and manage software packages
  53. written in Python. Many packages can be found in the Python Package Index
  54. (PyPI). pip is a recursive acronym that can stand for either "Pip Installs
  55. Packages" or "Pip Installs Python".
  56. %endif
  57. %prep
  58. %setup -q -n %{srcname}-%{version}
  59. %build
  60. %if %{with python3}
  61. %if %{without bootstrap}
  62. %py3_build_wheel
  63. %else
  64. %py3_build
  65. %endif
  66. %endif # with python3
  67. %install
  68. %{__rm} -rf %{buildroot}
  69. %if %{with python3}
  70. %if %{without bootstrap}
  71. %py3_install_wheel %{python3_wheelname}
  72. %else
  73. %py3_install
  74. %endif
  75. rm %{buildroot}%{_bindir}/pip
  76. %endif # with python3
  77. %clean
  78. %{__rm} -rf %{buildroot}
  79. %if %{with python3}
  80. %pre -n python3-%{srcname}
  81. if [ ! -L %{_bindir}/%{srcname} ]; then
  82. rm -f %{_bindir}/%{srcname}
  83. fi
  84. %post -n python3-%{srcname}
  85. /sbin/update-alternatives \
  86. --install %{_bindir}/%{srcname} %{srcname} \
  87. %{_bindir}/%{srcname}%{python3_version} %{python3_version_nodots}
  88. %preun -n python3-%{srcname}
  89. if [ "$1" = 0 ]; then
  90. /sbin/update-alternatives \
  91. --remove %{srcname} %{_bindir}/%{srcname}%{python3_version}
  92. fi
  93. %endif
  94. %if %{with python3}
  95. %files -n python3-pip
  96. %defattr(-,root,root,-)
  97. %license LICENSE.txt
  98. %doc README.rst docs
  99. %attr(755,root,root) %{_bindir}/pip3*
  100. %{python3_sitelib}/pip*
  101. %endif
  102. %changelog
  103. * Tue Jan 25 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 21.3.1-1
  104. - new upstream release.
  105. - dropped python2 support.
  106. * Tue Feb 23 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 20.3.4-1
  107. - new upstream release.
  108. * Sat Aug 15 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 20.2.2-1
  109. - new upstream release.
  110. * Wed Apr 08 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 20.0.2-1
  111. - new upstream release.
  112. * Sat Oct 06 2018 Toshiaki Ara <ara_t@384.jp> 18.1-1
  113. - new upstream release.
  114. - drop Patches
  115. - change URL
  116. * Mon Dec 18 2017 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 9.0.1-1
  117. - new upstream release.
  118. - made to use python{,3}-rpm-macros.
  119. - added a sub-package for python3.
  120. * Sat Jul 26 2014 Toshiharu Kudoh <toshi.kd2@gmail.com> 1.5.6-1
  121. - new upstream release
  122. - didn't rename pip to python-pip
  123. * Sun Jan 12 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.8.1-3
  124. - rebuild with VineSeed environment
  125. * Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.8.1-2
  126. - rebuild with python-2.7.2
  127. * Mon Nov 22 2010 Shu KONNO <owa@bg.wakwak.com> 0.8.1-1
  128. - updated pip to 0.8.1
  129. * Fri Sep 03 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 0.8-1
  130. - initial build for Vine Linux
  131. * Mon Aug 30 2010 Peter Halliday <phalliday@excelsiorsystems.net> - 0.8-1
  132. - update to 0.8 of pip
  133. * Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 0.7.2-5
  134. - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
  135. * Wed Jul 7 2010 Peter Halliday <phalliday@excelsiorsystems.net> - 0.7.2-1
  136. - update to 0.7.2 of pip
  137. * Sun May 23 2010 Peter Halliday <phalliday@excelsiorsystems.net> - 0.7.1-1
  138. - update to 0.7.1 of pip
  139. * Fri Jan 1 2010 Peter Halliday <phalliday@excelsiorsystems.net> - 0.6.1.4
  140. - fix dependency issue
  141. * Fri Dec 18 2009 Peter Halliday <phalliday@excelsiorsystems.net> - 0.6.1-2
  142. - fix spec file
  143. * Thu Dec 17 2009 Peter Halliday <phalliday@excelsiorsystems.net> - 0.6.1-1
  144. - upgrade to 0.6.1 of pip
  145. * Mon Aug 31 2009 Peter Halliday <phalliday@excelsiorsystems.net> - 0.4-1
  146. - Initial package