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