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