]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
Makefile: use absolute paths when setting PYTHONPATH
authorBrian Warner <warner@allmydata.com>
Wed, 17 Jan 2007 04:02:00 +0000 (21:02 -0700)
committerBrian Warner <warner@allmydata.com>
Wed, 17 Jan 2007 04:02:00 +0000 (21:02 -0700)
Makefile
builddir.py

index 5f41e8ce36733bdd0761b1eb3f906ece8a8c9937..710d593b9f8e45db1288e53c54b96d3319f1f644 100644 (file)
--- 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=
index dc777786bdcffac03f222376ce7657deaa9a7015..ce3d821a121814bb3484b784958d492fecdfd161 100644 (file)
@@ -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