forked from PatMart/netdnarws
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
103 lines (74 loc) · 1.71 KB
/
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# Setup
###
target=$(PWD)/build
source=$(PWD)/src
pypath=PYTHONPATH=$(target):./maxcdn:$(PYTHONPATH)
nose_opts=-v
nose=python $(source)/nose/bin/nosetests
cov_opts= --with-coverage --cover-package=maxcdn
benchmark=./test/benchmark.py
tests=./test/test.py
int=./test/int.py
# Tasks
###
init: clean setup test
setup: distribute
pip install -r requirements.txt -t $(target) -b $(source)
console:
$(pypath) python
clean:
rm -rf $(source) $(target) .ropeproject .coverage junit-report.xml
find . -type f -name "*.pyc" -exec rm -v {} \;
coverage: build/coverage
$(pypath) python $(nose) $(cov_opts) $(tests)
benchmark:
$(pypath) python $(benchmark)
test:
$(pypath) python $(tests)
test/2:
# python 2.x
$(pypath) python2 $(tests)
test/32:
# python 3.2
$(pypath) python3.2 $(tests)
test/33:
# python 3.3
$(pypath) python3.3 $(tests)
test/all:
-make test/2
-make test/32
-make test/33
nose: build/nose
$(pypath) $(nose) $(nose_opts) $(tests)
nose/int: build/nose
$(pypath) $(nose) $(nose_opts) $(int)
nose/all: nose nose/int
int:
$(pypath) python $(test_opts) $(int)
int/2:
# python 2.x
$(pypath) python2 $(test_opts) $(int)
int/32:
# python 3.2
$(pypath) python3.2 $(test_opts) $(int)
int/33:
# python 3.3
$(pypath) python3.3 $(test_opts) $(int)
int/all:
-make int/2
-make int/32
-make int/33
travis: setup test
distribute:
pip install distribute
build/coverage:
pip install coverage -t $(target) -b $(source)
build/nose:
pip install nose -t $(target) -b $(source)
readme:
pandoc -s -t rst --toc README.md -o tmp.text
cat tmp.text| grep -v "Build\|Status" > README.text
rm tmp.text
upload: readme
python setup.py sdist register upload
.PHONY: init clean test coverage test/help test/32 test/33