dev-python/plyvel: new package: python bindings for LevelDB
authorLouis Sautier <sautier.louis@gmail.com>
Wed, 13 Jan 2016 09:16:05 +0000 (10:16 +0100)
committerIan Delaney <idella4@gentoo.org>
Wed, 13 Jan 2016 10:31:31 +0000 (18:31 +0800)
Package-Manager: portage-2.2.26

dev-python/plyvel/Manifest [new file with mode: 0644]
dev-python/plyvel/metadata.xml [new file with mode: 0644]
dev-python/plyvel/plyvel-0.9.ebuild [new file with mode: 0644]

diff --git a/dev-python/plyvel/Manifest b/dev-python/plyvel/Manifest
new file mode 100644 (file)
index 0000000..c6eaa74
--- /dev/null
@@ -0,0 +1 @@
+DIST plyvel-0.9.tar.gz 121513 SHA256 587d93681ae44936ae086b4b45486eb302e3853ba5af149aac3be9e9713998e9 SHA512 21a3bf0bff075e429fef63418c2a2578b22a4904cc2f4f66fc5fbccec22c762d918bea0622a22dcbeee2e60f8d35210ae8f1e63b6d37405f0fdf29ca2fe80586 WHIRLPOOL baf98bb318bb402ba26d98b1a4657a72b7b1b93dda7e0f0b667b66af798cd6e7723a1ae740265a88266ab608023de8b3d350873560117bf9557f2e8abf792453
diff --git a/dev-python/plyvel/metadata.xml b/dev-python/plyvel/metadata.xml
new file mode 100644 (file)
index 0000000..55fd330
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+       <herd>proxy-maintainers</herd>
+       <maintainer>
+               <email>sautier.louis@gmail.com</email>
+               <name>Louis Sautier</name>
+               <description>Proxied maintainer; set to assignee in all bugs</description>
+       </maintainer>
+       <upstream>
+               <remote-id type="pypi">plyvel</remote-id>
+               <remote-id type="bitbucket">wbolster/plyvel</remote-id>
+       </upstream>
+</pkgmetadata>
diff --git a/dev-python/plyvel/plyvel-0.9.ebuild b/dev-python/plyvel/plyvel-0.9.ebuild
new file mode 100644 (file)
index 0000000..d99b31d
--- /dev/null
@@ -0,0 +1,54 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5} )
+
+inherit distutils-r1
+
+MY_PN="${PN/-/.}"
+DESCRIPTION="Python interface to LevelDB"
+HOMEPAGE="https://github.com/wbolster/plyvel"
+SRC_URI="mirror://pypi/${PN:0:1}/${MY_PN}/${MY_PN}-${PV}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc test"
+
+RDEPEND="dev-libs/leveldb"
+DEPEND="
+       ${RDEPEND}
+       dev-python/setuptools[${PYTHON_USEDEP}]
+       test? (
+               dev-python/pytest[${PYTHON_USEDEP}]
+               dev-python/pytest-runner[${PYTHON_USEDEP}]
+       )
+       doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
+"
+
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+python_compile() {
+       python_is_python3 || local -x CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
+       distutils-r1_python_compile
+}
+
+python_compile_all() {
+       use doc && emake doc
+}
+
+python_test() {
+       local lib="$(ls "${BUILD_DIR}/lib/${PN}/"*.so | head -n1)"
+       ln -s "${lib}" "${PN}" || die
+       py.test || die "tests failed with ${EPYTHON}"
+       rm "${PN}/$(basename "${lib}")" || die
+}
+
+python_install_all() {
+       use doc && local HTML_DOCS=( doc/build//html/. )
+       distutils-r1_python_install_all
+}
+