-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (35 loc) · 973 Bytes
/
Makefile
File metadata and controls
45 lines (35 loc) · 973 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
SRC = src
TEST = t
BUILDDIR = build
DISTDIR = dist
# Gah
SUBBUILDDIR = $(shell python -c 'import distutils.util, sys; print "lib.%s-%s" % (distutils.util.get_platform(), sys.version[0:3])')
BUILDDIR := $(BUILDDIR)/$(SUBBUILDDIR)
COVERAGE = $(or $(shell which coverage), $(shell which python-coverage), \
coverage)
all:
./setup.py build
install: all
./setup.py install
test: all
retval=0; \
for i in `find "$(TEST)" -perm -u+x -type f`; do \
echo $$i; \
PYTHONPATH="$(BUILDDIR):$$PYTHONPATH" $$i || retval=$$?; \
done; exit $$retval
coverage: all
rm -f .coverage
for i in `find "$(TEST)" -perm -u+x -type f`; do \
set -e; \
PYTHONPATH="$(BUILDDIR):$$PYTHONPATH" $(COVERAGE) -x $$i; \
done
$(COVERAGE) -r -m `find "$(BUILDDIR)" -name \\*.py -type f`
rm -f .coverage
clean:
./setup.py clean
rm -f `find -name \*.pyc` .coverage
distclean: clean
rm -rf "$(DISTDIR)"
dist:
./setup.py sdist
.PHONY: clean distclean dist test coverage install