]> git.pld-linux.org Git - packages/python3-requests.git/blame - python-requests.spec
- release 3 (by relup.sh)
[packages/python3-requests.git] / python-requests.spec
CommitLineData
e16ab944
ER
1# TODO
2# - bundled external libs? packages/ contains:
3# chardet/
4# chardet2/
5# oauthlib/
8d099eee
JB
6#
7# Conditional build:
8%bcond_without doc # HTML documentation build
9#
8ba13116
MM
10%define module requests
11Summary: HTTP library for Python
8d099eee 12Summary(pl.UTF-8): Biblioteka HTTP dla Pythona
8ba13116 13Name: python-%{module}
8d099eee 14Version: 0.13.9
ba11eee3 15Release: 3
8ba13116
MM
16License: ISC
17Group: Development/Languages/Python
8d099eee
JB
18Source0: https://github.com/kennethreitz/requests/tarball/v%{version}#/%{module}-%{version}.tar.gz
19# Source0-md5: a0ecf4d6177183a4bb2f50d92ea54fd6
8ba13116 20URL: https://github.com/kennethreitz/requests
8d099eee
JB
21BuildRequires: python >= 1:2.6
22BuildRequires: python3 >= 3.2
8ba13116
MM
23BuildRequires: rpm-pythonprov
24BuildRequires: rpmbuild(macros) >= 1.219
e16ab944 25BuildRequires: sed >= 4.0
8d099eee 26%{?with_doc:BuildRequires: sphinx-pdg >= 1.0}
8ba13116
MM
27Requires: python-modules
28BuildArch: noarch
29BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31%description
32Requests is an ISC Licensed HTTP library, written in Python, for human
33beings.
34
35Most existing Python modules for sending HTTP requests are extremely
36verbose and cumbersome. Python's builtin urllib2 module provides most
8d099eee 37of the HTTP capabilities you should need, but the API is thoroughly
8ba13116 38broken. It requires an enormous amount of work (even method overrides)
8d099eee
JB
39to perform the simplest of tasks. Things shouldn't be this way. Not in
40Python.
41
42%description -l pl.UTF-8
43Requests to napisana w Pythonie biblioteka HTTP dla ludzi, wydana na
44licencji ISC.
8ba13116 45
8d099eee
JB
46Większość istniejących modułów Pythona do wysyłania żądań HTTP jest
47zbyt gadatliwa i nieporęczna. Wbudowany w Pythona moduł urllib2
48zapewnia większość wymaganych możliwości HTTP, ale API jest kiepskie -
49wymaga dużych nakładów pracy (nawet nadpisań metod) do wykonania
50najprostszych zadań. Nie powinno tak być. Nie w Pythonie.
8ba13116 51
a0c91a8e
KK
52%package -n python3-requests
53Summary: HTTP library, written in Python, for human beings
8d099eee 54Summary(pl.UTF-8): Biblioteka HTTP library napisana w Pythonie dla ludzi
a0c91a8e
KK
55Group: Development/Languages/Python
56
57%description -n python3-requests
58Requests is an ISC Licensed HTTP library, written in Python, for human
59beings.
60
61Most existing Python modules for sending HTTP requests are extremely
62verbose and cumbersome. Python's builtin urllib2 module provides most
63of the HTTP capabilities you should need, but the api is thoroughly
64broken. It requires an enormous amount of work (even method overrides)
8d099eee
JB
65to perform the simplest of tasks. Things shouldn't be this way. Not in
66Python.
67
68%description -n python3-requests -l pl.UTF-8
69Requests is an ISC Licensed HTTP library, written in Python, for human
70beings.
a0c91a8e 71
8d099eee
JB
72Most existing Python modules for sending HTTP requests are extremely
73verbose and cumbersome. Python's builtin urllib2 module provides most
74of the HTTP capabilities you should need, but the API is thoroughly
75broken. It requires an enormous amount of work (even method overrides)
76to perform the simplest of tasks. Things shouldn't be this way. Not in
77Python.
a0c91a8e 78
8ba13116 79%prep
8d099eee 80%setup -q -n kennethreitz-%{module}-1be2a55
8ba13116 81
8d099eee
JB
82# avoid "distutils.errors.DistutilsByteCompileError: byte-compiling is disabled."
83%{__sed} -i -e '/PYTHONDONTWRITEBYTECODE/d' setup.py
e16ab944 84
8ba13116 85%build
e16ab944
ER
86ver=$(%{__python} -c "import requests; print requests.__version__")
87test "$ver" = %{version}
8ba13116 88
a0c91a8e
KK
89mkdir 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
8d099eee
JB
93%if %{with doc}
94%{__make} -C docs html
95%endif
8ba13116
MM
96
97%install
98rm -rf $RPM_BUILD_ROOT
a0c91a8e
KK
99%{__python} setup.py \
100 build --build-base py2 \
101 egg_info --egg-base py2-egg \
102 install \
8ba13116
MM
103 --skip-build \
104 --optimize=2 \
105 --root=$RPM_BUILD_ROOT
106
a0c91a8e
KK
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
8ba13116
MM
115%py_postclean
116
117%clean
118rm -rf $RPM_BUILD_ROOT
119
120%files
121%defattr(644,root,root,755)
8d099eee 122%doc AUTHORS.rst LICENSE README.rst %{?with_doc:docs/_build/html}
8ba13116 123%{py_sitescriptdir}/%{module}
8d099eee 124%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
a0c91a8e
KK
125
126%files -n python3-requests
127%defattr(644,root,root,755)
8d099eee 128%doc AUTHORS.rst LICENSE README.rst %{?with_doc:docs/_build/html}
a0c91a8e 129%{py3_sitescriptdir}/%{module}
8d099eee 130%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
This page took 0.092093 seconds and 4 git commands to generate.