]> git.pld-linux.org Git - packages/python3-requests.git/blob - python3-requests.spec
014ffaf14a64617a9344138ee03b1bd83834afd0
[packages/python3-requests.git] / python3-requests.spec
1 #
2 # Conditional build:
3 %bcond_with     tests   # pytest tests (one test fails with pytest-httpbin 1.0.0)
4
5 %define         urllib3_ver     1.21.1
6 %define         module          requests
7 %define         egg_name        requests
8 Summary:        HTTP library for Python
9 Summary(pl.UTF-8):      Biblioteka HTTP dla Pythona
10 Name:           python3-%{module}
11 Version:        2.28.1
12 Release:        1
13 License:        Apache v2.0
14 Group:          Development/Languages/Python
15 #Source0Download: https://pypi.org/simple/requests/
16 Source0:        https://files.pythonhosted.org/packages/source/r/requests/%{module}-%{version}.tar.gz
17 # Source0-md5:  796ea875cdae283529c03b9203d9c454
18 Patch0:         system-cert.patch
19 Patch1:         python-requests-reqs.patch
20 Patch2:         python-requests-disable-xdist.patch
21 URL:            https://docs.python-requests.org/
22 BuildRequires:  rpm-pythonprov
23 BuildRequires:  rpmbuild(macros) >= 1.713
24 BuildRequires:  python3-modules >= 1:3.6
25 BuildRequires:  python3-setuptools
26 %if %{with tests}
27 BuildRequires:  python3-PySocks >= 1.5.8
28 BuildRequires:  python3-certifi >= 2017.4.17
29 BuildRequires:  python3-charset_normalizer >= 2
30 BuildRequires:  python3-charset_normalizer < 2.1
31 BuildRequires:  python3-idna >= 2.5
32 BuildRequires:  python3-idna < 4
33 BuildRequires:  python3-pytest >= 3
34 BuildRequires:  python3-pytest-cov
35 BuildRequires:  python3-pytest-httpbin >= 0.0.7
36 BuildRequires:  python3-pytest-mock >= 2.0.0
37 BuildRequires:  python3-pytest-xdist
38 BuildRequires:  python3-urllib3 >= %{urllib3_ver}
39 BuildRequires:  python3-urllib3 < 1.27
40 %endif
41 Requires:       python3-modules >= 1:3.6
42 Requires:       python3-charset_normalizer >= 2
43 # for https
44 Requires:       python3-cryptography >= 1.3.4
45 Requires:       python3-idna >= 2.5
46 Requires:       python3-pyOpenSSL >= 0.14
47 Requires:       python3-urllib3 >= 1.22-2
48 Suggests:       ca-certificates
49 BuildArch:      noarch
50 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51
52 %description
53 Requests is a HTTP library, written in Python, for human beings.
54
55 Most existing Python modules for sending HTTP requests are extremely
56 verbose and cumbersome. Python's builtin urllib2 module provides most
57 of the HTTP capabilities you should need, but the API is thoroughly
58 broken. It requires an enormous amount of work (even method overrides)
59 to perform the simplest of tasks. Things shouldn't be this way. Not in
60 Python.
61
62 This package contains Python 3.x module.
63
64 %description -l pl.UTF-8
65 Requests to napisana w Pythonie biblioteka HTTP dla ludzi.
66
67 Większość istniejących modułów Pythona do wysyłania żądań HTTP jest
68 zbyt gadatliwa i nieporęczna. Wbudowany w Pythona moduł urllib2
69 zapewnia większość wymaganych możliwości HTTP, ale API jest kiepskie -
70 wymaga dużych nakładów pracy (nawet nadpisań metod) do wykonania
71 najprostszych zadań. Nie powinno tak być. Nie w Pythonie.
72
73 Ten pakiet zawiera moduł dla Pythona 3.x.
74
75 %prep
76 %setup -q -n %{module}-%{version}
77 %patch0 -p1
78 %patch1 -p1
79 %patch2 -p1
80
81 %build
82 %py3_build
83
84 %if %{with tests}
85 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
86 PYTEST_PLUGINS="pytest_httpbin.plugin,pytest_mock" \
87 %{__python3} -m pytest tests
88 %endif
89
90 %install
91 rm -rf $RPM_BUILD_ROOT
92
93 %py3_install
94
95 %clean
96 rm -rf $RPM_BUILD_ROOT
97
98 %files
99 %defattr(644,root,root,755)
100 %doc HISTORY.md README.md
101 %{py3_sitescriptdir}/%{module}
102 %{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
This page took 0.044326 seconds and 2 git commands to generate.