File: Makefile

package info (click to toggle)
cram 0.7-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 336 kB
  • sloc: python: 908; makefile: 46; sh: 20
file content (38 lines) | stat: -rw-r--r-- 878 bytes parent folder | download | duplicates (4)
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
COVERAGE?=python-coverage
PREFIX=/usr/local
export PREFIX
PYTHON?=python

all: build

build:
	$(PYTHON) setup.py build

check: test

clean:
	-$(PYTHON) setup.py clean --all
	find . -not \( -path '*/.hg/*' -o -path '*/.git/*' \) \
		\( -name '*.py[cdo]' -o -name '*.err' -o \
		-name '*,cover' -o -name __pycache__ \) -prune \
		-exec rm -rf '{}' ';'
	rm -rf dist build htmlcov
	rm -f MANIFEST .coverage cram.xml

dist:
	TAR_OPTIONS="--owner=root --group=root --mode=u+w,go-w,a+rX-s" \
		$(PYTHON) setup.py -q sdist

install: build
	$(PYTHON) setup.py install --prefix="$(PREFIX)" --force

quicktest:
	PYTHON=$(PYTHON) PYTHONPATH=`pwd` scripts/cram $(TESTOPTS) tests

test:
	$(COVERAGE) erase
	COVERAGE=$(COVERAGE) PYTHON=$(PYTHON) PYTHONPATH=`pwd` scripts/cram \
		$(TESTOPTS) tests
	$(COVERAGE) report --fail-under=92

.PHONY: all build check clean install dist quicktest test