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