From 9c6d190190c774f8d38d6a4c370eb5040b0f04c1 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Tue, 16 Jan 2007 21:02:00 -0700 Subject: [PATCH] Makefile: use absolute paths when setting PYTHONPATH --- Makefile | 31 ++++++++++++++++--------------- builddir.py | 2 ++ 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index 5f41e8ce3..710d593b9 100644 --- a/Makefile +++ b/Makefile @@ -1,19 +1,6 @@ default: build -.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-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 @@ -21,11 +8,25 @@ build: # builddir.py to locate it. ifneq ($(PYTHONPATH),) -PP=PYTHONPATH=${PYTHONPATH}:$(shell python ./builddir.py) +PP=PYTHONPATH=${PYTHONPATH}:$(shell python ./builddir.py -a) else -PP=PYTHONPATH=$(shell python ./builddir.py) +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: 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 + + TEST=allmydata REPORTER= diff --git a/builddir.py b/builddir.py index dc777786b..ce3d821a1 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