]> git.pld-linux.org Git - packages/python3-requests.git/blob - python-requests.spec
- up to 2.18.4
[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 %define         egg_name        requests
10 %define         pypi_name       requests
11 Summary:        HTTP library for Python 2
12 Summary(pl.UTF-8):      Biblioteka HTTP dla Pythona 2
13 Name:           python-%{module}
14 Version:        2.18.4
15 Release:        1
16 License:        Apache v2.0
17 Group:          Development/Languages/Python
18 Source0:        https://files.pythonhosted.org/packages/source/r/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
19 # Source0-md5:  081412b2ef79bdc48229891af13f4d82
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-idna >= 2.5
31 BuildRequires:  python-pytest >= 2.8.0
32 BuildRequires:  python-pytest-cov
33 BuildRequires:  python-pytest-httpbin >= 0.0.7
34 BuildRequires:  python-pytest-mock
35 BuildRequires:  python-urllib3 >= %{urllib3ver}
36 %endif
37 %endif
38 %if %{with python3}
39 BuildRequires:  python3-modules >= 1:3.2
40 BuildRequires:  python3-setuptools
41 %if %{with tests}
42 BuildRequires:  python3-certifi >= 2017.4.17
43 BuildRequires:  python3-chardet >= 3.0.2
44 BuildRequires:  python3-idna >= 2.5
45 BuildRequires:  python3-pytest >= 2.8.0
46 BuildRequires:  python3-pytest-cov
47 BuildRequires:  python3-pytest-httpbin >= 0.0.7
48 BuildRequires:  python3-pytest-mock
49 BuildRequires:  python3-urllib3 >= %{urllib3ver}
50 %endif
51 %endif
52 Suggests:       ca-certificates
53 # for python2 only to get SNI working. python3 doesn't need this
54 Requires:       python-ndg-httpsclient
55 Requires:       python-pyOpenSSL >= 0.14
56 Requires:       python-pyasn1
57 Requires:       python-urllib3 >= 1.22-2
58 BuildArch:      noarch
59 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
60
61 %description
62 Requests is a HTTP library, written in Python, for human beings.
63
64 Most existing Python modules for sending HTTP requests are extremely
65 verbose and cumbersome. Python's builtin urllib2 module provides most
66 of the HTTP capabilities you should need, but the API is thoroughly
67 broken. It requires an enormous amount of work (even method overrides)
68 to perform the simplest of tasks. Things shouldn't be this way. Not in
69 Python.
70
71 This package contains Python 2.x module.
72
73 %description -l pl.UTF-8
74 Requests to napisana w Pythonie biblioteka HTTP dla ludzi.
75
76 Większość istniejących modułów Pythona do wysyłania żądań HTTP jest
77 zbyt gadatliwa i nieporęczna. Wbudowany w Pythona moduł urllib2
78 zapewnia większość wymaganych możliwości HTTP, ale API jest kiepskie -
79 wymaga dużych nakładów pracy (nawet nadpisań metod) do wykonania
80 najprostszych zadań. Nie powinno tak być. Nie w Pythonie.
81
82 Ten pakiet zawiera moduł dla Pythona 2.x.
83
84 %package -n python3-requests
85 Summary:        HTTP library for Python 3
86 Summary(pl.UTF-8):      Biblioteka HTTP dla Pythona 3
87 Group:          Development/Languages/Python
88 Requires:       python3-urllib3 >= 1.22-2
89 Suggests:       ca-certificates
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}/%{egg_name}-%{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}/%{egg_name}-%{version}-py*.egg-info
158 %endif
This page took 0.049744 seconds and 3 git commands to generate.