]> git.pld-linux.org Git - packages/python3-requests.git/blob - python-requests.spec
ce65ecfc1b6f8ec00ea02d3aaf3c1a8c0d2ff6d3
[packages/python3-requests.git] / python-requests.spec
1 #
2 # Conditional build:
3 %bcond_with     tests   # test target [Pipfile file missing as of 2.19.1]
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 %define         urllib3_ver     1.21.1
8 %define         module          requests
9 %define         egg_name        requests
10 Summary:        HTTP library for Python 2
11 Summary(pl.UTF-8):      Biblioteka HTTP dla Pythona 2
12 Name:           python-%{module}
13 Version:        2.20.1
14 Release:        1
15 License:        Apache v2.0
16 Group:          Development/Languages/Python
17 #Source0Download: https://pypi.org/simple/requests/
18 Source0:        https://files.pythonhosted.org/packages/source/r/requests/%{module}-%{version}.tar.gz
19 # Source0-md5:  2918817ea4688f4ea21cb4b11e353448
20 Patch0:         system-cert.patch
21 URL:            http://python-requests.org/
22 BuildRequires:  rpm-pythonprov
23 BuildRequires:  rpmbuild(macros) >= 1.713
24 %if %{with python2}
25 BuildRequires:  python-modules >= 1:2.7
26 BuildRequires:  python-setuptools
27 %if %{with tests}
28 BuildRequires:  python-PySocks >= 1.5.8
29 BuildRequires:  python-certifi >= 2017.4.17
30 BuildRequires:  python-chardet >= 3.0.2
31 BuildRequires:  python-chardet < 3.1.0
32 BuildRequires:  python-idna >= 2.5
33 BuildRequires:  python-idna < 2.8
34 BuildRequires:  python-pytest >= 2.8.0
35 BuildRequires:  python-pytest-cov
36 BuildRequires:  python-pytest-httpbin >= 0.0.7
37 BuildRequires:  python-pytest-mock
38 BuildRequires:  python-pytest-xdist
39 BuildRequires:  python-urllib3 >= %{urllib3_ver}
40 BuildRequires:  python-urllib3 < 1.25
41 %endif
42 %endif
43 %if %{with python3}
44 BuildRequires:  python3-modules >= 1:3.4
45 BuildRequires:  python3-setuptools
46 %if %{with tests}
47 BuildRequires:  python3-PySocks >= 1.5.8
48 BuildRequires:  python3-certifi >= 2017.4.17
49 BuildRequires:  python3-chardet >= 3.0.2
50 BuildRequires:  python3-chardet < 3.1.0
51 BuildRequires:  python3-idna >= 2.5
52 BuildRequires:  python3-idna < 2.8
53 BuildRequires:  python3-pytest >= 2.8.0
54 BuildRequires:  python3-pytest-cov
55 BuildRequires:  python3-pytest-httpbin >= 0.0.7
56 BuildRequires:  python3-pytest-mock
57 BuildRequires:  python3-pytest-xdist
58 BuildRequires:  python3-urllib3 >= %{urllib3_ver}
59 BuildRequires:  python3-urllib3 < 1.25
60 %endif
61 %endif
62 Suggests:       ca-certificates
63 # for python2 only to get SNI working. python3 doesn't need this
64 Requires:       python-cryptography >= 1.3.4
65 Requires:       python-pyOpenSSL >= 0.14
66 Requires:       python-urllib3 >= 1.22-2
67 BuildArch:      noarch
68 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
69
70 %description
71 Requests is a HTTP library, written in Python, for human beings.
72
73 Most existing Python modules for sending HTTP requests are extremely
74 verbose and cumbersome. Python's builtin urllib2 module provides most
75 of the HTTP capabilities you should need, but the API is thoroughly
76 broken. It requires an enormous amount of work (even method overrides)
77 to perform the simplest of tasks. Things shouldn't be this way. Not in
78 Python.
79
80 This package contains Python 2.x module.
81
82 %description -l pl.UTF-8
83 Requests to napisana w Pythonie biblioteka HTTP dla ludzi.
84
85 Większość istniejących modułów Pythona do wysyłania żądań HTTP jest
86 zbyt gadatliwa i nieporęczna. Wbudowany w Pythona moduł urllib2
87 zapewnia większość wymaganych możliwości HTTP, ale API jest kiepskie -
88 wymaga dużych nakładów pracy (nawet nadpisań metod) do wykonania
89 najprostszych zadań. Nie powinno tak być. Nie w Pythonie.
90
91 Ten pakiet zawiera moduł dla Pythona 2.x.
92
93 %package -n python3-requests
94 Summary:        HTTP library for Python 3
95 Summary(pl.UTF-8):      Biblioteka HTTP dla Pythona 3
96 Group:          Development/Languages/Python
97 # for https
98 Requires:       python3-cryptography >= 1.3.4
99 Requires:       python3-pyOpenSSL >= 0.14
100 Requires:       python3-urllib3 >= 1.22-2
101 Suggests:       ca-certificates
102
103 %description -n python3-requests
104 Requests is a HTTP library, written in Python, for human beings.
105
106 Most existing Python modules for sending HTTP requests are extremely
107 verbose and cumbersome. Python's builtin urllib2 module provides most
108 of the HTTP capabilities you should need, but the api is thoroughly
109 broken. It requires an enormous amount of work (even method overrides)
110 to perform the simplest of tasks. Things shouldn't be this way. Not in
111 Python.
112
113 This package contains Python 3.x module.
114
115 %description -n python3-requests -l pl.UTF-8
116 Requests to napisana w Pythonie biblioteka HTTP dla ludzi.
117
118 Większość istniejących modułów Pythona do wysyłania żądań HTTP jest
119 zbyt gadatliwa i nieporęczna. Wbudowany w Pythona moduł urllib2
120 zapewnia większość wymaganych możliwości HTTP, ale API jest kiepskie -
121 wymaga dużych nakładów pracy (nawet nadpisań metod) do wykonania
122 najprostszych zadań. Nie powinno tak być. Nie w Pythonie.
123
124 Ten pakiet zawiera moduł dla Pythona 3.x.
125
126 %prep
127 %setup -q -n %{module}-%{version}
128 %patch0 -p1
129
130 %build
131 %if %{with python2}
132 %py_build %{?with_tests:test}
133 %endif
134
135 %if %{with python3}
136 %py3_build %{?with_tests:test}
137 %endif
138
139 %install
140 rm -rf $RPM_BUILD_ROOT
141
142 %if %{with python2}
143 %py_install
144 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
145 %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
146 %py_postclean
147 %endif
148
149 %if %{with python3}
150 %py3_install
151 %endif
152
153 %clean
154 rm -rf $RPM_BUILD_ROOT
155
156 %if %{with python2}
157 %files
158 %defattr(644,root,root,755)
159 %doc HISTORY.md README.md
160 %{py_sitescriptdir}/%{module}
161 %{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
162 %endif
163
164 %if %{with python3}
165 %files -n python3-requests
166 %defattr(644,root,root,755)
167 %doc HISTORY.md README.md
168 %{py3_sitescriptdir}/%{module}
169 %{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
170 %endif
This page took 0.058984 seconds and 2 git commands to generate.