X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=Makefile;h=118c778b3d049ca42225b173dc19f7a4f9e7919a;hb=219ac627505b0eaf438a099d44a48f12e78a3671;hp=1a3420c2fe4a13f2430539d8279f4dfcf03668ef;hpb=5d80869516dfcecb8e7fe6f117e2fb658b57b25b;p=nepi.git diff --git a/Makefile b/Makefile index 1a3420c2..118c778b 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,6 @@ 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])') @@ -21,7 +20,7 @@ PYPATH = $(BUILDDIR):$(TESTLIB):$(PYTHONPATH) COVERAGE = $(or $(shell which coverage), $(shell which python-coverage), \ coverage) -all: +all: clean PYTHONPATH="$(PYTHONPATH):$(SRCDIR)" ./setup.py build install: all @@ -30,13 +29,13 @@ install: all test: all retval=0; \ for i in `find "$(TESTDIR)" -iname '*.py' -perm -u+x -type f`; do \ - @echo $$i; \ + echo $$i; \ PYTHONPATH="$(PYPATH)" $$i -v || retval=$$?; \ done; exit $$retval test-one: all - @echo $(file) $(case) - PYTHONPATH="$(PYPATH)" python $(file) $(case) + echo $(file) $(case) + PYTHONPATH="$(PYPATH)" $(file) $(case) coverage: all rm -f .coverage @@ -49,8 +48,8 @@ coverage: all rm -f .coverage clean: - ./setup.py clean rm -f `find -name \*.pyc` .coverage *.pcap + rm -rf "$(BUILDDIR)" distclean: clean rm -rf "$(DISTDIR)" @@ -65,3 +64,18 @@ dist: MANIFEST ./setup.py sdist .PHONY: all clean distclean dist test coverage install MANIFEST + +########## for uploading onto pypi +# use pypitest instead for tests (both entries need to be defined in your .pypirc) +PYPI_TARGET=pypi +PYPI_TARBALL_HOST=root@build.onelab.eu +PYPI_TARBALL_TOPDIR=/build/nepi + +VERSIONTAG=$(shell cat VERSION) + +# run this only once the sources are in on the right tag +pypi: + setup.py sdist upload -r $(PYPI_TARGET) + ssh $(PYPI_TARBALL_HOST) mkdir -p $(PYPI_TARBALL_TOPDIR)/$(VERSIONTAG) + rsync -av dist/nepi-$(VERSIONTAG).tar.gz $(PYPI_TARBALL_HOST):$(PYPI_TARBALL_TOPDIR)/ +