]> git.pld-linux.org Git - packages/python3-requests.git/blob - python-requests.spec
- updated to 2.0.1
[packages/python3-requests.git] / python-requests.spec
1 # Conditional build:
2 %bcond_without  python2         # build python 2 module
3 %bcond_without  python3         # build python 3 module
4 #
5 %define         module  requests
6 Summary:        HTTP library for Python
7 Summary(pl.UTF-8):      Biblioteka HTTP dla Pythona
8 Name:           python-%{module}
9 Version:        2.0.1
10 Release:        1
11 License:        Apache2
12 Group:          Development/Languages/Python
13 Source0:        https://pypi.python.org/packages/source/r/requests/%{module}-%{version}.tar.gz
14 # Source0-md5:  38e61c2856d2ba2782286730241975e6
15 URL:            http://python-requests.org
16 Patch0:         system-charade-and-urllib3.patch
17 Patch1:         system-cert.patch
18 %if %{with python2}
19 BuildRequires:  python-charade
20 BuildRequires:  python-modules >= 1:2.6
21 BuildRequires:  python-urllib3
22 %endif
23 %if %{with python3}
24 BuildRequires:  python3-charade
25 BuildRequires:  python3-modules >= 3.2
26 BuildRequires:  python3-urllib3
27 %endif
28 BuildRequires:  rpm-pythonprov
29 BuildRequires:  rpmbuild(macros) >= 1.219
30 Requires:       ca-certificates
31 Requires:       python-charade
32 Requires:       python-modules >= 1:2.6
33 Requires:       python-urllib3
34 BuildArch:      noarch
35 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37 %description
38 Requests is a HTTP library, written in Python, for human beings.
39
40 Most existing Python modules for sending HTTP requests are extremely
41 verbose and cumbersome. Python's builtin urllib2 module provides most
42 of the HTTP capabilities you should need, but the API is thoroughly
43 broken. It requires an enormous amount of work (even method overrides)
44 to perform the simplest of tasks. Things shouldn't be this way. Not in
45 Python.
46
47 %description -l pl.UTF-8
48 Requests to napisana w Pythonie biblioteka HTTP dla ludzi.
49
50 Większość istniejących modułów Pythona do wysyłania żądań HTTP jest
51 zbyt gadatliwa i nieporęczna. Wbudowany w Pythona moduł urllib2
52 zapewnia większość wymaganych możliwości HTTP, ale API jest kiepskie -
53 wymaga dużych nakładów pracy (nawet nadpisań metod) do wykonania
54 najprostszych zadań. Nie powinno tak być. Nie w Pythonie.
55
56 %package -n python3-requests
57 Summary:        HTTP library, written in Python, for human beings
58 Summary(pl.UTF-8):      Biblioteka HTTP library napisana w Pythonie dla ludzi
59 Group:          Development/Languages/Python
60 Requires:       ca-certificates
61 Requires:       python3-charade
62 Requires:       python3-modules >= 3.2
63 Requires:       python3-urllib3
64
65 %description -n python3-requests
66 Requests is a HTTP library, written in Python, for human beings.
67
68 Most existing Python modules for sending HTTP requests are extremely
69 verbose and cumbersome. Python's builtin urllib2 module provides most
70 of the HTTP capabilities you should need, but the api is thoroughly
71 broken. It requires an enormous amount of work (even method overrides)
72 to perform the simplest of tasks. Things shouldn't be this way. Not in
73 Python.
74
75 %description -n python3-requests -l pl.UTF-8
76 Requests to napisana w Pythonie biblioteka HTTP dla ludzi.
77
78 Większość istniejących modułów Pythona do wysyłania żądań HTTP jest
79 zbyt gadatliwa i nieporęczna. Wbudowany w Pythona moduł urllib2
80 zapewnia większość wymaganych możliwości HTTP, ale API jest kiepskie -
81 wymaga dużych nakładów pracy (nawet nadpisań metod) do wykonania
82 najprostszych zadań. Nie powinno tak być. Nie w Pythonie.
83
84 %prep
85 %setup -q -n %{module}-%{version}
86 %patch0 -p1
87 %patch1 -p1
88
89 %build
90 %if %{with python2}
91 %{__python} setup.py build -b py2
92 %endif
93
94 %if %{with python3}
95 %{__python3} setup.py build -b py3
96 %endif
97
98 %install
99 rm -rf $RPM_BUILD_ROOT
100
101 %if %{with python2}
102 %{__python} setup.py \
103         build -b py2 \
104         install \
105         --skip-build \
106         --optimize=2 \
107         --root=$RPM_BUILD_ROOT
108 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
109 %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
110 %py_postclean
111 %endif
112
113 %if %{with python3}
114 %{__python3} setup.py  \
115         build -b py3 \
116         install \
117         --skip-build \
118         --optimize=2 \
119         --root=$RPM_BUILD_ROOT
120 %endif
121
122 %{__rm} -rf $RPM_BUILD_ROOT{%{py_sitescriptdir},%{py3_sitescriptdir}}/%{module}/{cacert.pem,packages}
123
124 %clean
125 rm -rf $RPM_BUILD_ROOT
126
127 %if %{with python2}
128 %files
129 %defattr(644,root,root,755)
130 %doc HISTORY.rst README.rst
131 %{py_sitescriptdir}/%{module}
132 %if "%{py_ver}" > "2.4"
133 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
134 %endif
135 %endif
136
137 %if %{with python3}
138 %files -n python3-requests
139 %defattr(644,root,root,755)
140 %doc HISTORY.rst README.rst
141 %{py3_sitescriptdir}/%{module}
142 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
143 %endif
This page took 0.091619 seconds and 4 git commands to generate.