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