3 %bcond_with tests # pytest tests (one test fails with pytest-httpbin 1.0.0)
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}
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: 941e175c276cd7d39d098092c56679a4
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
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
41 Requires: python3-modules >= 1:3.6
42 Requires: python3-charset_normalizer >= 2
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
50 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
53 Requests is a HTTP library, written in Python, for human beings.
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
62 This package contains Python 3.x module.
64 %description -l pl.UTF-8
65 Requests to napisana w Pythonie biblioteka HTTP dla ludzi.
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.
73 Ten pakiet zawiera moduł dla Pythona 3.x.
76 %setup -q -n %{module}-%{version}
85 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
86 PYTEST_PLUGINS="pytest_httpbin.plugin,pytest_mock" \
87 %{__python3} -m pytest tests
91 rm -rf $RPM_BUILD_ROOT
96 rm -rf $RPM_BUILD_ROOT
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