forked from gever/bwx-adventure
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
44 lines (37 loc) · 1.22 KB
/
Copy pathmakefile
File metadata and controls
44 lines (37 loc) · 1.22 KB
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
all: python3 \
python3/advent.py \
python3/bwx-game.py \
python3/tutorial1.py \
python3/tutorial2.py \
python3/tutorial3.py \
python3/tutorial4.py \
python3/tutorial5.py \
python3/tutorial6.py \
python3/tutorial7.py
python3:
mkdir -p python3
python3/%.py: %.py
grep -v -e "@staticmethod" -e advent_devtools $< > $@
2to3 --no-diffs -w -n $@
perl -i -p -e "s/\Qnet_f.read()\E/net_f.read().decode('utf-8')/" $@
perl -i -p -e "s/\Q, urllib.error\E//" $@
perl -i -p -e "s/\Q, urllib.parse\E//" $@
perl -i -p -e "s/\Qimport textwrap\E//" $@
perl -i -p -e "s/\QFalse: # trinket.io\E/True: # trinket.io/" $@
perl -i -p -e "s/\Qtextwrap.fill\E/(lambda x: x)/" $@
clean:
rm -rf python3
test: smoke_test functional_test
smoke_test: all
echo "run test" | python3 ./python3/tutorial2.py
echo "run test" | python ./tutorial2.py
echo "run test" | python3 ./python3/tutorial3.py
echo "run test" | python ./tutorial3.py
echo "run test" | python3 ./python3/tutorial4.py
echo "run test" | python ./tutorial4.py
echo "run test" | python3 ./python3/tutorial5.py
echo "run test" | python ./tutorial5.py
echo "run test" | python3 ./python3/bwx-game.py
echo "run test" | python ./bwx-game.py
functional_test: all
cd test && ./run.sh