tdev-python/hiredis: Add 0.2.0 - parlay - yet another gentoo overlay (HTM) git clone https://git.parazyd.org/parlay (DIR) Log (DIR) Files (DIR) Refs (DIR) README --- (DIR) commit 3283e3e1e7b7758add6126b49471bf0cd8b9ed11 (DIR) parent d05d9eafa7b8c96a2f1af03539210e0c19a2ce0d (HTM) Author: parazyd <parazyd@dyne.org> Date: Mon, 16 Oct 2017 21:40:51 +0200 dev-python/hiredis: Add 0.2.0 Diffstat: A dev-python/hiredis/Manifest | 1 + A dev-python/hiredis/files/hiredis-0… | 28 ++++++++++++++++++++++++++++ A dev-python/hiredis/hiredis-0.2.0.e… | 28 ++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+), 0 deletions(-) --- (DIR) diff --git a/dev-python/hiredis/Manifest b/dev-python/hiredis/Manifest t@@ -0,0 +1 @@ +DIST hiredis-0.2.0.tar.gz 46113 SHA256 ca958e13128e49674aa4a96f02746f5de5973f39b57297b84d59fd44d314d5b5 SHA512 9eb18ec089517340043d14938a213b139dc948dc9cf2f9c65e632bb4694ac22543b87a5875c1cea083e2bc8e303103c749047889cdb3e9d5680b586d34330c86 WHIRLPOOL 5c2252d82814b8365a29160c41133571083954c317f9c36f534e3f0aa98bc97621f144479b715da0d5c77a0a00a7a5e0b69fb63c2559a4ebf124d88be93d477d (DIR) diff --git a/dev-python/hiredis/files/hiredis-0.2.0-system-libs.patch b/dev-python/hiredis/files/hiredis-0.2.0-system-libs.patch t@@ -0,0 +1,28 @@ +Remove vendor and var 'lib' from setup.py +diff -u hiredis-0.2.0.orig/setup.py hiredis-0.2.0/setup.py +--- setup.py 2015-06-21 11:47:28.796472027 +0800 ++++ setup.py 2015-06-21 11:49:53.047949803 +0800 +@@ -40,12 +40,9 @@ + # supported Python versions is worse... + # + # Also see: https://github.com/pietern/hiredis-py/issues/15 +-lib = ("hiredis_for_hiredis_py", { +- "sources": ["vendor/hiredis/%s.c" % src for src in ("read", "sds")]}) + + ext = Extension("hiredis.hiredis", +- sources=glob.glob("src/*.c"), +- include_dirs=["vendor"]) ++ sources=glob.glob("src/*.c")) + + setup( + name="hiredis", +@@ -57,7 +54,6 @@ + keywords=["Redis"], + license="BSD", + packages=["hiredis"], +- libraries=[lib], + ext_modules=[ext], + + # Override "install_lib" command +Common subdirectories: hiredis-0.2.0.orig/src and hiredis-0.2.0/src +Common subdirectories: hiredis-0.2.0.orig/vendor and hiredis-0.2.0/vendor (DIR) diff --git a/dev-python/hiredis/hiredis-0.2.0.ebuild b/dev-python/hiredis/hiredis-0.2.0.ebuild t@@ -0,0 +1,28 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} ) + +inherit distutils-r1 + +DESCRIPTION="Python extension that wraps hiredis" +HOMEPAGE="https://github.com/pietern/hiredis-py" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="amd64 arm x86" +IUSE="" + +DEPEND=">=dev-libs/hiredis-0.13.1" +RDEPEND="${DEPEND}" + +PATCHES=( "${FILESDIR}"/${P}-system-libs.patch ) + +python_compile() { + python_is_python3 || local -x CFLAGS="${CFLAGS} -fno-strict-aliasing" + + distutils-r1_python_compile +}