summaryrefslogtreecommitdiff
path: root/dev-python/restkit
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/restkit')
-rw-r--r--dev-python/restkit/Manifest4
-rw-r--r--dev-python/restkit/files/setup.patch23
-rw-r--r--dev-python/restkit/metadata.xml15
-rw-r--r--dev-python/restkit/restkit-4.2.2.ebuild50
4 files changed, 92 insertions, 0 deletions
diff --git a/dev-python/restkit/Manifest b/dev-python/restkit/Manifest
new file mode 100644
index 000000000000..8bcea676196b
--- /dev/null
+++ b/dev-python/restkit/Manifest
@@ -0,0 +1,4 @@
+AUX setup.patch 843 BLAKE2B 80626eb7317e42fc828493d98afb330873040bd0bf3a33c4c4ef225a4f57bea078e3440172509a5442868c565eeaf675c82c47d514bb4a915881d8aec2456a4b SHA512 200c112cb264271d8c1f043acb22ac476d09a0fc325b74658a950939f71edb8fad84a0fbc5f11335152fe5591be98a14df63f57458b84d35c2511a2079778387
+DIST restkit-4.2.2.tar.gz 1275904 BLAKE2B 4ebfc3ad91265954c28712e4beadcb25a467fe7af8c68bb655016ddb20877ca63275136605400c59b462825526a59f69d69d4b687641816b4704b62623498734 SHA512 5ed08535e1a54b5594d97b059d8662ab4bc19c68e71a30719c4a533cba0f2d0e18872119752c62136563a32281e8f747414fbf843fd97dba138107ffcb5d1e4b
+EBUILD restkit-4.2.2.ebuild 1303 BLAKE2B f9a2b32813959020ad6d9de32f5215e88cf58d7438d8088f7518999812c21c392d2cba171ebe545c9334292030c6e7101757367a4cba4e63201d5b0901b96526 SHA512 d8672a91230d14fa00199df7ed08a887521a02f46a5e210c3bc86c37e4df49ea2fcc8fe9f4a1970472a9316f89eeff6122032369bf6fa427d9d06112963ce0dd
+MISC metadata.xml 520 BLAKE2B a4f0485d0276279a820836969654d31173c08f1fb840892a5760cc484f8156bcc88ff2ee371aa1154883be957d9b62dc9ddc6cf242ec02b4e9cc9cfb45c99449 SHA512 6e5652c44b93cb00a07485b337e4be168e0728ee49485692bb6b3cdc5725f78191ca891059197f3665a9f1ac1f65074843b7a2fa7cfc4ef0d92d52033f685acb
diff --git a/dev-python/restkit/files/setup.patch b/dev-python/restkit/files/setup.patch
new file mode 100644
index 000000000000..cfa8959539e1
--- /dev/null
+++ b/dev-python/restkit/files/setup.patch
@@ -0,0 +1,23 @@
+diff -ur restkit-4.2.2.org/setup.py restkit-4.2.2/setup.py
+--- setup.py 2013-08-30 23:07:36.000000000 +0800
++++ setup.py 2015-01-16 21:38:04.342084550 +0800
+@@ -38,11 +38,6 @@
+ with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as f:
+ long_description = f.read()
+
+- DATA_FILES = [
+- ('restkit', ["LICENSE", "MANIFEST.in", "NOTICE", "README.rst",
+- "THANKS", "TODO.txt"])
+- ]
+-
+ options=dict(
+ name = 'restkit',
+ version = version.__version__,
+@@ -54,7 +49,6 @@
+ url = 'http://benoitc.github.com/restkit',
+ classifiers = CLASSIFIERS,
+ packages = find_packages(exclude=['tests']),
+- data_files = DATA_FILES,
+ scripts = SCRIPTS,
+ zip_safe = False,
+ entry_points = {
diff --git a/dev-python/restkit/metadata.xml b/dev-python/restkit/metadata.xml
new file mode 100644
index 000000000000..6322e79afeb5
--- /dev/null
+++ b/dev-python/restkit/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>dev-zero@gentoo.org</email>
+ <name>Tiziano Müller</name>
+ </maintainer>
+ <use>
+ <flag name="cli">Install the restcli command line interface/tool, based on <pkg>dev-python/ipython</pkg></flag>
+ </use>
+ <upstream>
+ <remote-id type="pypi">restkit</remote-id>
+ <remote-id type="github">benoitc/restkit</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-python/restkit/restkit-4.2.2.ebuild b/dev-python/restkit/restkit-4.2.2.ebuild
new file mode 100644
index 000000000000..044ce7bfa2a4
--- /dev/null
+++ b/dev-python/restkit/restkit-4.2.2.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 pypy )
+
+inherit distutils-r1
+
+DESCRIPTION="A HTTP ressource kit for Python"
+HOMEPAGE="https://github.com/benoitc/restkit"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~arm64 ppc64 ~s390 ~sh x86"
+IUSE="+cli doc examples test"
+
+PY27_USEDEP="$(python_gen_usedep python2_7)"
+RDEPEND="cli? ( dev-python/ipython[${PY27_USEDEP}] )
+ dev-python/webob[${PYTHON_USEDEP}]
+ >=dev-python/socketpool-0.5.3[${PYTHON_USEDEP}]
+ >=dev-python/http-parser-0.8.3[${PYTHON_USEDEP}]"
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
+ doc? ( dev-python/sphinx[${PYTHON_USEDEP}]
+ dev-python/epydoc[${PY27_USEDEP}] )
+ test? ( ${RDEPEND}
+ dev-python/nose[${PYTHON_USEDEP}] )"
+
+# prevent duplicate install of data files
+PATCHES=( "${FILESDIR}"/setup.patch )
+
+python_compile_all() {
+ if use doc ; then
+ pushd doc > /dev/null
+ emake html
+ popd > /dev/null
+ fi
+}
+
+python_test() {
+ nosetests tests || die "Tests fail with ${EPYTHON}"
+}
+
+python_install_all() {
+ use cli || rm "${D}"/usr/bin/restcli* || die
+ use doc && local HTML_DOCS=( doc/_build/html/. )
+ use examples && local EXAMPLES=( examples/. )
+ distutils-r1_python_install_all
+}