From 10e958cb8d3786946e30d4114f8afe27b9daccaf Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nicolas=20Zingil=C3=A9?= Date: Tue, 11 Feb 2014 11:38:22 +0100 Subject: [PATCH] initial packaging MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Bug-Tizen: TINF-416 Change-Id: I63251f5fe8803b7ec5246a1c4c4b3331f842cff0 Signed-off-by: Nicolas Zingilé --- .gbs.conf | 3 ++ packaging/python-requests.manifest | 5 ++++ packaging/python-requests.spec | 58 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 66 insertions(+) create mode 100644 .gbs.conf create mode 100644 packaging/python-requests.manifest create mode 100644 packaging/python-requests.spec 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}/* -- 2.7.4