From ee11025c6887fabc2acb62987b01e41f32496449 Mon Sep 17 00:00:00 2001 From: Eivind Uggedal Date: Mon, 3 Aug 2015 13:05:55 +0000 Subject: [PATCH] New package: python-hiredis-0.2.0 --- .../python-hiredis/patches/system-libs.patch | 28 +++++++++++++++++ srcpkgs/python-hiredis/template | 30 +++++++++++++++++++ srcpkgs/python3.4-hiredis | 1 + 3 files changed, 59 insertions(+) create mode 100644 srcpkgs/python-hiredis/patches/system-libs.patch create mode 100644 srcpkgs/python-hiredis/template create mode 120000 srcpkgs/python3.4-hiredis diff --git a/srcpkgs/python-hiredis/patches/system-libs.patch b/srcpkgs/python-hiredis/patches/system-libs.patch new file mode 100644 index 00000000000..6cd22292deb --- /dev/null +++ b/srcpkgs/python-hiredis/patches/system-libs.patch @@ -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 diff --git a/srcpkgs/python-hiredis/template b/srcpkgs/python-hiredis/template new file mode 100644 index 00000000000..16cba027db8 --- /dev/null +++ b/srcpkgs/python-hiredis/template @@ -0,0 +1,30 @@ +# Template file for 'python-hiredis' +pkgname=python-hiredis +version=0.2.0 +revision=1 +wrksrc="hiredis-${version}" +build_style=python-module +python_versions="2.7 3.4" +hostmakedepends="python-devel python3.4-devel" +makedepends="python-devel python3.4-devel hiredis-devel" +pycompile_module="hiredis" +short_desc="Python2 wrapper for hiredis" +maintainer="Eivind Uggedal " +license="BSD" +homepage="https://github.com/redis/hiredis-py" +distfiles="${PYPI_SITE}/h/hiredis/hiredis-${version}.tar.gz" +checksum=ca958e13128e49674aa4a96f02746f5de5973f39b57297b84d59fd44d314d5b5 + +post_install() { + vlicense COPYING +} + +python3.4-hiredis_package() { + pycompile_version="3.4" + pycompile_module="hiredis" + short_desc="${short_desc/Python2/Python3.4}" + pkg_install() { + vmove usr/lib/python3.4 + vlicense COPYING + } +} diff --git a/srcpkgs/python3.4-hiredis b/srcpkgs/python3.4-hiredis new file mode 120000 index 00000000000..c6091c82645 --- /dev/null +++ b/srcpkgs/python3.4-hiredis @@ -0,0 +1 @@ +python-hiredis \ No newline at end of file