From: Nicolas Zingilé Date: Tue, 11 Feb 2014 10:38:22 +0000 (+0100) Subject: initial packaging X-Git-Tag: accepted/tizen/3.0/common/20161114.111628^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;p=platform%2Fupstream%2Fpython-requests.git initial packaging Bug-Tizen: TINF-416 Change-Id: I63251f5fe8803b7ec5246a1c4c4b3331f842cff0 Signed-off-by: Nicolas Zingilé --- diff --git a/.gbs.conf b/.gbs.conf new file mode 100644 index 0000000..99e7cc8 --- /dev/null +++ b/.gbs.conf @@ -0,0 +1,3 @@ +[general] +upstream_branch = upstream +upstream_tag = upstream/${upstreamversion} diff --git a/packaging/python-requests.manifest b/packaging/python-requests.manifest new file mode 100644 index 0000000..017d22d --- /dev/null +++ b/packaging/python-requests.manifest @@ -0,0 +1,5 @@ + + + + + diff --git a/packaging/python-requests.spec b/packaging/python-requests.spec new file mode 100644 index 0000000..a0641ec --- /dev/null +++ b/packaging/python-requests.spec @@ -0,0 +1,58 @@ +Name: python-requests +Version: 2.2.1 +Release: 0 +Summary: Awesome Python HTTP Library That's Actually Usable +License: Apache-2.0 +GROUP: Development/Python +URL: http://python-requests.org +Source: %{name}-%{version}.tar.gz +Source1001: %{name}.manifest +BuildRequires: fdupes +BuildRequires: python +BuildRequires: python-devel +BuildRequires: python-setuptools +Requires: python +BuildArch: noarch + +%description +Most existing Python modules for sending HTTP requests are extremely verbose and +cumbersome. Python’s built-in urllib2 module provides most of the HTTP +capabilities you should need, but the API is thoroughly broken. This library is +designed to make HTTP requests easy for developers. + +Features: + +- Extremely simple GET, HEAD, POST, PUT, DELETE Requests + + Simple HTTP Header Request Attachment + + Simple Data/Params Request Attachment + + Simple Multipart File Uploads + + CookieJar Support + + Redirection History + + Redirection Recursion Urllib Fix + + Auto Decompression of GZipped Content + + Unicode URL Support +- Simple Authentication + + Simple URL + HTTP Auth Registry + +%prep +%setup -q -n requests-%{version} +cp %{SOURCE1001} . +# for rpmlint warning: remove shebang from python library +sed -i '/^#!/d' ./requests/certs.py +sed -i '/^#!/d' ./requests/packages/chardet/chardetect.py + +%build +python setup.py build + +%check +python setup.py test + +%install +python setup.py install --skip-build --prefix=%{_prefix} --root=%{buildroot} +%fdupes $RPM_BUILD_ROOT + +%files +%manifest %{name}.manifest +%defattr(-,root,root,-) +%license LICENSE +%{python_sitelib}/*