python-requests-vl.spec 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. %define ver 2.20.1
  2. %define rel 2
  3. Summary: Python HTTP for Humans
  4. Name: python-requests
  5. Version: %{ver}
  6. Release: %{rel}%{?_dist_release}
  7. License: ASLv2
  8. Group: Development/Languages
  9. URL: https://pypi.python.org/pypi/requests
  10. Source0: https://pypi.python.org/packages/source/r/requests/requests-%{version}.tar.gz
  11. # Explicitly use the system certificates in ca-certificates.
  12. # https://bugzilla.redhat.com/show_bug.cgi?id=904614
  13. Patch0: patch-requests-certs.py-to-use-the-system-CA-bundle.patch
  14. # https://bugzilla.redhat.com/show_bug.cgi?id=1450608
  15. Patch2: Remove-tests-that-use-the-tarpit.patch
  16. # Use 127.0.0.1 not localhost for socket.bind() in the Server test
  17. # class, to fix tests in Koji's no-network environment
  18. # This probably isn't really upstreamable, because I guess localhost
  19. # could technically be IPv6 or something, and our no-network env is
  20. # a pretty odd one so this is a niche requirement.
  21. Patch3: requests-2.12.4-tests_nonet.patch
  22. # https://bugzilla.redhat.com/show_bug.cgi?id=1567862
  23. Patch4: Don-t-inject-pyopenssl-into-urllib3.patch
  24. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
  25. Requires: python
  26. Requires: python-urllib3
  27. Requires: python-chardet
  28. Requires: python-idna
  29. BuildRequires: python-devel
  30. BuildRequires: python-rpm-macros
  31. BuildRequires: python-setuptools
  32. BuildRequires: python3-devel
  33. BuildRequires: python3-rpm-macros
  34. BuildRequires: python3-setuptools
  35. BuildArch: noarch
  36. Vendor: Project Vine
  37. Distribution: Vine Linux
  38. Packager: iwaim
  39. %description
  40. Requests is an Apache2 Licensed HTTP library, written in Python, for human beings.
  41. %package -n python3-requests
  42. Summary: Python HTTP for Humans
  43. Group: Development/Languages
  44. Requires: python3
  45. Requires: python3-urllib3
  46. Requires: python3-chardet
  47. Requires: python3-idna
  48. %description -n python3-requests
  49. Requests is an Apache2 Licensed HTTP library, written in Python, for human beings.
  50. %prep
  51. %autosetup -p1 -n requests-%{version}
  52. # Unbundle the certificate bundle from mozilla.
  53. rm -rf requests/cacert.pem
  54. # env shebang in nonexecutable file
  55. sed -i '/#!\/usr\/.*python/d' requests/certs.py
  56. %build
  57. %py_build
  58. %py3_build
  59. %install
  60. rm -rf $RPM_BUILD_ROOT
  61. %py_install
  62. %py3_install
  63. %clean
  64. rm -rf $RPM_BUILD_ROOT
  65. %files
  66. %defattr(-,root,root,-)
  67. %license LICENSE
  68. %doc README* HISTORY*
  69. %{python_sitelib}/requests
  70. %{python_sitelib}/requests-%{version}-py*.egg-info
  71. %files -n python3-requests
  72. %defattr(-,root,root,-)
  73. %license LICENSE
  74. %doc README* HISTORY*
  75. %{python3_sitelib}/requests
  76. %{python3_sitelib}/requests-%{version}-py*.egg-info
  77. %changelog
  78. * Wed Nov 28 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.20.1-2
  79. - fixed R:.
  80. - imported Patch0-4 from rawhide.
  81. * Wed Nov 28 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.20.1-1
  82. - new upstream release.
  83. - add python2 support.
  84. * Tue Jun 28 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.5.1-2
  85. - rebuild with python3-3.5.2
  86. * Sun Mar 22 2015 IWAI, Masaharu <iwaim.sub@gmail.com> 2.5.1-1
  87. - Initial build.