From: Brian Warner Date: Wed, 17 Jan 2007 04:02:00 +0000 (-0700) Subject: Makefile: use absolute paths when setting PYTHONPATH X-Git-Tag: tahoe_v0.1.0-0-UNSTABLE~362 X-Git-Url: https://git.rkrishnan.org/pf/content/en/seg/-?a=commitdiff_plain;h=9c6d190190c774f8d38d6a4c370eb5040b0f04c1;p=tahoe-lafs%2Ftahoe-lafs.git Makefile: use absolute paths when setting PYTHONPATH --- diff --git a/Makefile b/Makefile index 5f41e8ce..710d593b 100644 --- a/Makefile +++ b/Makefile @@ -1,30 +1,31 @@ default: build +.PHONY: build +build: + python setup.py build +# where does this go? in a platform-specific directory under build/ . Use +# builddir.py to locate it. + +ifneq ($(PYTHONPATH),) +PP=PYTHONPATH=${PYTHONPATH}:$(shell python ./builddir.py -a) +else +PP=PYTHONPATH=$(shell python ./builddir.py -a) +endif + .PHONY: run-queen run-client test run-queen: cd queen-basedir && PYTHONPATH=.. twistd -noy ../queen.tac -run-client: - cd client-basedir && PYTHONPATH=.. twistd -noy ../client.tac +run-client: build + cd client-basedir && $(PP) twistd -noy ../client.tac run-client2: cd client-basedir2 && PYTHONPATH=.. twistd -noy ../client.tac run-client3: cd client-basedir3 && PYTHONPATH=.. twistd -noy ../client.tac -.PHONY: build -build: - python setup.py build -# where does this go? in a platform-specific directory under build/ . Use -# builddir.py to locate it. - -ifneq ($(PYTHONPATH),) -PP=PYTHONPATH=${PYTHONPATH}:$(shell python ./builddir.py) -else -PP=PYTHONPATH=$(shell python ./builddir.py) -endif TEST=allmydata REPORTER= diff --git a/builddir.py b/builddir.py index dc777786..ce3d821a 100644 --- a/builddir.py +++ b/builddir.py @@ -7,4 +7,6 @@ from distutils.util import get_platform # libdir. If we were using a pure-python module, this would just be "lib". plat_specifier = ".%s-%s" % (get_platform(), sys.version[0:3]) libdir = os.path.join("build", "lib" + plat_specifier) +if len(sys.argv) > 1 and sys.argv[1] == "-a": + libdir = os.path.abspath(libdir) print libdir