From: Apollon Oikonomopoulos <apoikos@debian.org>
Date: Wed, 2 Jul 2014 10:51:27 +0300
Subject: Use system libhiredis

Patch setup.py to not build hiredis in vendor/

Forwarded: no
Last-Updated: 2014-07-02
diff --git a/setup.py b/setup.py
index c2c4dcd..529cb38 100755
--- a/setup.py
+++ b/setup.py
@@ -41,7 +41,8 @@ lib = ("hiredis_for_hiredis_py", {
 
 ext = Extension("hiredis.hiredis",
   sources=glob.glob("src/*.c"),
-  include_dirs=["vendor"])
+  include_dirs=["vendor"],
+  extra_link_args=["-lhiredis"])
 
 setup(
   name="hiredis",
@@ -53,11 +54,13 @@ setup(
   keywords=["Redis"],
   license="BSD",
   packages=["hiredis"],
-  libraries=[lib],
+  # Disabled in Debian, we use the system hiredis library
+  # libraries=[lib],
   ext_modules=[ext],
 
   # Override "install_lib" command
-  cmdclass={ "install_lib": install_lib },
+  # Debian: disable and link against the system hiredis library
+  # cmdclass={ "install_lib": install_lib },
 
   classifiers=[
     'Development Status :: 5 - Production/Stable',
