From aea19c9d65a7a70770fbcc25a81579575382c40d Mon Sep 17 00:00:00 2001 From: David Reiss Date: Wed, 29 Aug 2007 23:17:32 +0000 Subject: [PATCH] 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 --- README | 6 +++++- lib/py/Makefile.am | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README b/README index 647df05e..0953f37f 100644 --- a/README +++ b/README @@ -102,10 +102,14 @@ CXXFLAGS option in configure, as such: ./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 27d11158..24c58921 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) -- 2.17.1