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