]> git.pld-linux.org Git - packages/python3-requests.git/blob - python-requests.spec
- updated to 0.13.9
[packages/python3-requests.git] / python-requests.spec
1 # TODO
2 # - bundled external libs? packages/ contains:
3 #   chardet/
4 #   chardet2/
5 #   oauthlib/
6 #
7 # Conditional build:
8 %bcond_without  doc     # HTML documentation build
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:        0.13.9
15 Release:        1
16 License:        ISC
17 Group:          Development/Languages/Python
18 Source0:        https://github.com/kennethreitz/requests/tarball/v%{version}#/%{module}-%{version}.tar.gz
19 # Source0-md5:  a0ecf4d6177183a4bb2f50d92ea54fd6
20 URL:            https://github.com/kennethreitz/requests
21 BuildRequires:  python >= 1:2.6
22 BuildRequires:  python3 >= 3.2
23 BuildRequires:  rpm-pythonprov
24 BuildRequires:  rpmbuild(macros) >= 1.219
25 BuildRequires:  sed >= 4.0
26 %{?with_doc:BuildRequires:      sphinx-pdg >= 1.0}
27 Requires:       python-modules
28 BuildArch:      noarch
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 %description
32 Requests is an ISC Licensed HTTP library, written in Python, for human
33 beings.
34
35 Most existing Python modules for sending HTTP requests are extremely
36 verbose and cumbersome. Python's builtin urllib2 module provides most
37 of the HTTP capabilities you should need, but the API is thoroughly
38 broken. It requires an enormous amount of work (even method overrides)
39 to perform the simplest of tasks. Things shouldn't be this way. Not in
40 Python.
41
42 %description -l pl.UTF-8
43 Requests to napisana w Pythonie biblioteka HTTP dla ludzi, wydana na
44 licencji ISC.
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
57 %description -n python3-requests
58 Requests is an ISC Licensed HTTP library, written in Python, for human
59 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 is an ISC Licensed HTTP library, written in Python, for human
70 beings.
71
72 Most existing Python modules for sending HTTP requests are extremely
73 verbose and cumbersome. Python's builtin urllib2 module provides most
74 of the HTTP capabilities you should need, but the API is thoroughly
75 broken. It requires an enormous amount of work (even method overrides)
76 to perform the simplest of tasks. Things shouldn't be this way. Not in
77 Python.
78
79 %prep
80 %setup -q -n kennethreitz-%{module}-1be2a55
81
82 # avoid "distutils.errors.DistutilsByteCompileError: byte-compiling is disabled."
83 %{__sed} -i -e '/PYTHONDONTWRITEBYTECODE/d' setup.py
84
85 %build
86 ver=$(%{__python} -c "import requests; print requests.__version__")
87 test "$ver" = %{version}
88
89 mkdir py2-egg py3-egg
90 %{__python} setup.py build --build-base py2 egg_info --egg-base py2-egg
91 %{__python3} setup.py build --build-base py3 egg_info --egg-base py3-egg
92
93 %if %{with doc}
94 %{__make} -C docs html
95 %endif
96
97 %install
98 rm -rf $RPM_BUILD_ROOT
99 %{__python} setup.py \
100         build --build-base py2 \
101         egg_info --egg-base py2-egg \
102         install \
103         --skip-build \
104         --optimize=2 \
105         --root=$RPM_BUILD_ROOT
106
107 %{__python3} setup.py  \
108         build --build-base py3 \
109         egg_info --egg-base py3-egg \
110         install \
111         --skip-build \
112         --optimize=2 \
113         --root=$RPM_BUILD_ROOT
114
115 %py_postclean
116
117 %clean
118 rm -rf $RPM_BUILD_ROOT
119
120 %files
121 %defattr(644,root,root,755)
122 %doc AUTHORS.rst LICENSE README.rst %{?with_doc:docs/_build/html}
123 %{py_sitescriptdir}/%{module}
124 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
125
126 %files -n python3-requests
127 %defattr(644,root,root,755)
128 %doc AUTHORS.rst LICENSE README.rst %{?with_doc:docs/_build/html}
129 %{py3_sitescriptdir}/%{module}
130 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
This page took 0.034971 seconds and 4 git commands to generate.