X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=Makefile;h=01a1d3bf021f4b6a30d49eb34e1e176b3839aeb3;hb=6b5d5c46b4d6c3c8bba46d3c84efab12be4e32bd;hp=039820b2865b90f3f8d15ffacc9b3f1cae86bfc5;hpb=071f62fddeabab808850b303249adaaf84747c4c;p=nepi.git diff --git a/Makefile b/Makefile index 039820b2..01a1d3bf 100644 --- a/Makefile +++ b/Makefile @@ -4,14 +4,17 @@ TESTLIB = $(TESTDIR)/lib BUILDDIR = $(CURDIR)/build DISTDIR = $(CURDIR)/dist -# stupid distutils, it's broken in so many ways SUBBUILDDIR = $(shell python -c 'import distutils.util, sys; \ print "lib.%s-%s" % (distutils.util.get_platform(), \ sys.version[0:3])') PYTHON25 := $(shell python -c 'import sys; v = sys.version_info; \ print (1 if v[0] <= 2 and v[1] <= 5 else 0)') +ifeq ($(PYTHON25),0) +BUILDDIR := $(BUILDDIR)/$(SUBBUILDDIR) +else BUILDDIR := $(BUILDDIR)/lib +endif PYPATH = $(BUILDDIR):$(TESTLIB):$(PYTHONPATH) COVERAGE = $(or $(shell which coverage), $(shell which python-coverage), \ @@ -32,7 +35,7 @@ test: all test-one: all echo $(file) $(case) - PYTHONPATH="$(PYPATH)" python $(file) $(case) + PYTHONPATH="$(PYPATH)" $(file) $(case) coverage: all rm -f .coverage