forked from bfontaine/term2048
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (38 loc) · 944 Bytes
/
Makefile
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
46
47
48
49
# term2048's Makefile
#
SRC=term2048
COVERFILE:=.coverage
COVERAGE_REPORT:=report -m
PY_VERSION:=$(subst ., ,$(shell python --version 2>&1 | cut -d' ' -f2))
PY_VERSION_MAJOR:=$(word 1,$(PY_VERSION))
PY_VERSION_MINOR:=$(word 2,$(PY_VERSION))
PY_VERSION_SHORT:=$(PY_VERSION_MAJOR).$(PY_VERSION_MINOR)
ifdef TRAVIS_PYTHON_VERSION
PY_VERSION_SHORT:=$(TRAVIS_PYTHON_VERSION)
endif
.DEFAULT: check-versions
.PHONY: check check-versions stylecheck covercheck
deps:
pip install -qr requirements.txt
ifeq ($(PY_VERSION_SHORT),2.6)
pip install -qr py26-requirements.txt
endif
ifneq ($(PY_VERSION_SHORT),3.3)
ifneq ($(PY_VERSION_SHORT),3.4)
pip install -q wsgiref==0.1.2
endif
endif
check:
python tests/test.py
check-versions:
tox
stylecheck:
pep8 $(SRC)
covercheck:
coverage run --source=term2048 tests/test.py
coverage $(COVERAGE_REPORT)
clean:
rm -f *~ */*~
rm -f $(COVERFILE)
publish: check-versions
python setup.py sdist upload