diff options
author | Pacho Ramos <pacho@gentoo.org> | 2018-06-24 15:12:16 +0200 |
---|---|---|
committer | Pacho Ramos <pacho@gentoo.org> | 2018-06-24 15:14:09 +0200 |
commit | 64b64fac141a31ed4dabc2790c495f2197393214 (patch) | |
tree | a655241cf023e470e932a992adb4273bcbb4d100 /dev-python/hiredis | |
parent | dev-python/hglib: Support python3.6 (diff) | |
download | gentoo-64b64fac141a31ed4dabc2790c495f2197393214.tar.gz gentoo-64b64fac141a31ed4dabc2790c495f2197393214.tar.bz2 gentoo-64b64fac141a31ed4dabc2790c495f2197393214.zip |
dev-python/hiredis: Fix linking (#653790 by Ștefan Talpalaru)
Package-Manager: Portage-2.3.40, Repoman-2.3.9
Diffstat (limited to 'dev-python/hiredis')
-rw-r--r-- | dev-python/hiredis/files/hiredis-0.2.0-r1-system-libs.patch | 26 | ||||
-rw-r--r-- | dev-python/hiredis/hiredis-0.2.0-r1.ebuild | 27 |
2 files changed, 53 insertions, 0 deletions
diff --git a/dev-python/hiredis/files/hiredis-0.2.0-r1-system-libs.patch b/dev-python/hiredis/files/hiredis-0.2.0-r1-system-libs.patch new file mode 100644 index 000000000000..19d4bd8598ff --- /dev/null +++ b/dev-python/hiredis/files/hiredis-0.2.0-r1-system-libs.patch @@ -0,0 +1,26 @@ +diff -ur hiredis-0.2.0.orig/setup.py hiredis-0.2.0/setup.py +--- hiredis-0.2.0.orig/setup.py 2015-04-03 16:08:45.000000000 +0200 ++++ hiredis-0.2.0/setup.py 2018-04-22 16:57:15.966520939 +0200 +@@ -40,12 +40,11 @@ + # 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"]) ++ libraries=["hiredis"], ++) + + setup( + name="hiredis", +@@ -57,7 +56,6 @@ + keywords=["Redis"], + license="BSD", + packages=["hiredis"], +- libraries=[lib], + ext_modules=[ext], + + # Override "install_lib" command diff --git a/dev-python/hiredis/hiredis-0.2.0-r1.ebuild b/dev-python/hiredis/hiredis-0.2.0-r1.ebuild new file mode 100644 index 000000000000..c3bd60743801 --- /dev/null +++ b/dev-python/hiredis/hiredis-0.2.0-r1.ebuild @@ -0,0 +1,27 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +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}-r1-system-libs.patch ) + +python_compile() { + python_is_python3 || local -x CFLAGS="${CFLAGS} -fno-strict-aliasing" + + distutils-r1_python_compile +} |