run-client3:
cd client-basedir3 && PYTHONPATH=.. twistd -noy ../client.tac
-test:
- trial allmydata
+.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: build
+ $(PP) trial allmydata
test-figleaf:
- trial --reporter=bwverbose-figleaf allmydata
+ $(PP) trial --reporter=bwverbose-figleaf allmydata
figleaf2html -d coverage-html -x allmydata/test/figleaf.excludes
# after doing test-figleaf, point your browser at coverage-html/index.html
figleaf-output:
figleaf2html -d coverage-html -x allmydata/test/figleaf.excludes
+clean:
+ rm -rf build
+
create_dirs:
mkdir -p queen-basedir
mkdir -p client-basedir
--- /dev/null
+#! /usr/bin/python
+
+import sys, os.path
+from distutils.util import get_platform
+
+# because we use extension modules, we need a platform+version-specific
+# 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)
+print libdir