4 WEBHOST = login.dulug.duke.edu
5 WEBPATH = /home/groups/urlgrabber/web/download
8 SCM_MODULE = $(PACKAGE)
9 CLEANFILES = MANIFEST *~ build dist export release daily reference nonexistent_file ChangeLog.bak \
10 *.pyc urlgrabber/*.pyc scripts/*.pyc test/*.pyc test/nonexistent_file \
11 test/reference test/reference.part urlgrabber/*~
12 ##############################################################################
13 VERSION = $(shell $(PYTHON) -c 'import $(PY_MODULE); print $(PY_MODULE).__version__')
14 DATE = $(shell $(PYTHON) -c 'import $(PY_MODULE); print $(PY_MODULE).__date__')
15 SCM_TAG = release-$(shell echo $(VERSION) | sed -e 's/\./_/g')
16 PYTHON22 = $(shell /usr/bin/which python2.2 2>/dev/null)
17 PYTHON23 = $(shell /usr/bin/which python2.3 2>/dev/null)
18 PYTHON24 = $(shell /usr/bin/which python2.4 2>/dev/null)
19 PYTHON25 = $(shell /usr/bin/which python2.5 2>/dev/null)
20 TESTPYTHONS = $(PYTHON22) $(PYTHON23) $(PYTHON24) $(PYTHON25)
21 ##############################################################################
24 @echo TARGETS: changelog release clean test
27 $(GIT) log --since=2006-12-01 --pretty --numstat --summary | maint/git2cl > ChangeLog
29 # NOTE: do --manifest-only first even though we're about to force it. The
30 # former ensures that MANIFEST exists (touch would also do the trick). If
31 # the file 'MANIFEST' doesn't exist, then it won't be included the next time
32 # it's built from MANIFEST.in
33 release: FORCE pre-release-test
34 @dir=$$PWD; $(PYTHON) setup.py sdist --manifest-only
35 @dir=$$PWD; $(PYTHON) setup.py sdist --force-manifest
36 @echo "The archive is in dist/${PACKAGE}-$(VERSION).tar.gz"
39 @echo "You should make sure you've updated the changelog"
40 @echo "version = $(VERSION), date = $(DATE), tag = $(SCM_TAG)"
41 test $(DATE) = `date +'%Y/%m/%d'` # verify release date is set to today
47 @export PYTHONPATH=.; \
48 $(PYTHON) test/runtests.py -v 1; \