Thrift: Python libraries install into /usr, not /usr/local
Summary:
It seems like the Python convention is that random janky libraries
are installed in /usr/lib/pythonX.Y/site-packages. This patch follows
that convention, even though it is pretty gross to ignore --prefix.
Reviewed By: mcslee
Test Plan: make install thrift python libs on my box.
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665233 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/README b/README
index 647df05..0953f37 100644
--- a/README
+++ b/README
@@ -102,10 +102,14 @@
./configure CXXFLAGS='-g -O2'
./configure CFLAGS='-g -O2'
- ./configure CPPFLAGS='-g -O2'
+ ./configure CPPFLAGS='-DDEBUG_MY_FEATURE'
Run ./configure --help to see other configuration options
+Please be aware that the Python library will ignore the --prefix option
+and just install wherever Python's distutils puts it (usually along
+the lines of /usr/lib/pythonX.Y/site-packages/). DESTDIR is respected.
+
Make thrift:
make
diff --git a/lib/py/Makefile.am b/lib/py/Makefile.am
index 27d1115..24c5892 100644
--- a/lib/py/Makefile.am
+++ b/lib/py/Makefile.am
@@ -1,4 +1,8 @@
DESTDIR ?= /
+# We're ignoring prefix here because site-packages seems to be
+# the equivalent of /usr/local/lib in Python land.
+# Old version (can't put inline because it's not portable).
+#$(PYTHON) setup.py install --prefix=$(prefix) --root=$(DESTDIR) $(PYTHON_SETUPUTIL_ARGS)
install-exec-hook:
- $(PYTHON) setup.py install --prefix=$(prefix) --root=$(DESTDIR) $(PYTHON_SETUPUTIL_ARGS)
+ $(PYTHON) setup.py install --root=$(DESTDIR) $(PYTHON_SETUPUTIL_ARGS)