X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=Makefile;h=b81f33c0e6429ce1933786f58f22376559b7993a;hb=refs%2Fheads%2Fpy3;hp=aa5cb1d22298de60dedcdfe6e8181fa67ca04d81;hpb=342187d6e7ce34d4fdf403952637659b93aa4bee;p=nepi.git diff --git a/Makefile b/Makefile index aa5cb1d2..b81f33c0 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,4 @@ +PYTHON = python3 SRCDIR = $(CURDIR)/src TESTDIR = $(CURDIR)/test TESTLIB = $(TESTDIR)/lib @@ -9,16 +10,16 @@ COVERAGE = $(or $(shell which coverage), $(shell which python-coverage), \ coverage) all: clean - PYTHONPATH="$(PYTHONPATH):$(SRCDIR)" ./setup.py build + PYTHONPATH="$(PYTHONPATH):$(SRCDIR)" $(PYTHON) ./setup.py build install: all - PYTHONPATH="$(PYTHONPATH):$(SRCDIR)" ./setup.py install + PYTHONPATH="$(PYTHONPATH):$(SRCDIR)" $(PYTHON) ./setup.py install test: all retval=0; \ for i in `find "$(TESTDIR)" -iname '*.py' -perm -u+x -type f`; do \ echo $$i; \ - PYTHONPATH="$(PYPATH)" $$i -v || retval=$$?; \ + PYTHONPATH="$(PYPATH)" $(PYTHON) $$i -v || retval=$$?; \ done; exit $$retval ifeq ($(file),) @@ -27,9 +28,12 @@ test-one: else test-one: all echo $(file) $(case) - PYTHONPATH="$(PYPATH)" $(file) $(case) + PYTHONPATH="$(PYPATH)" $(PYTHON) $(file) $(case) endif + +all-tests: test-app test-node + test-app: $(MAKE) test-one file=test/resources/linux/application.py case=$(case) test-node: @@ -66,8 +70,15 @@ dist: MANIFEST ########## for uploading onto pypi # this assumes you have an entry 'pypi' in your .pypirc # see pypi documentation on how to create .pypirc +LOCAL_ID=$(shell id) +ifneq "$(LOCAL_ID)" "$(filter $(LOCAL_ID),parmen)" +BUILD_ID=thierry +else +BUILD_ID=mario +endif + PYPI_TARGET=pypi -PYPI_TARBALL_HOST=mario@build.onelab.eu +PYPI_TARBALL_HOST=$(BUILD_ID)@build.onelab.eu PYPI_TARBALL_TOPDIR=/build/nepi VERSION=$(shell cat VERSION) @@ -98,3 +109,13 @@ testpypi: #./setup.py sdist upload -r testpypi ./setup.py sdist twine upload dist/* -r testpypi + +#################### convenience, for debugging only +# make +foo : prints the value of $(foo) +# make ++foo : idem but verbose, i.e. foo=$(foo) +++%: varname=$(subst +,,$@) +++%: + @echo "$(varname)=$($(varname))" ++%: varname=$(subst +,,$@) ++%: + @echo "$($(varname))"