hiredis-py
hiredis-py copied to clipboard
Allow to use platform hiredis libs on build.
At the build stage, the internal hiredis lib are used. But on Linux the hiredis C lib are available, so in many cases it will be better to use the system one.
By vendoring hiredis it's possible to work against a specific version, right down to a single commit.
I don't know if there are other reasons hiredis is vendored, specific to ruby, but that's my guess.
Edit: Python, not ruby. There are too many hiredis wrappers!
I think this be controlled by an build setting like "use_system_hiredis=false" by default. So it will not break anything.
diff --git a/setup.py b/setup.py
index bc8a95c..c28dd94 100755
--- a/setup.py
+++ b/setup.py
@@ -11,9 +11,8 @@ def version():
return module.__version__
ext = Extension("hiredis.hiredis",
- sources=sorted(glob.glob("src/*.c") +
- ["vendor/hiredis/%s.c" % src for src in ("read", "sds")]),
- include_dirs=["vendor"])
+ sources=sorted(glob.glob("src/*.c")),
+ libraries=['hiredis'])
setup(
name="hiredis",
It's easy, until you have to deal with API breaking changes.