-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
64 lines (51 loc) · 1.43 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
.PHONY: game dev prod
# User CLI Targets
# Default target
game:
venv/bin/python -m space_war.main
########################################################
# Dependencies
########################################################
dev: venv/dev_installed
prod: venv/wheel_installed
web-dev: dev pre-web
venv/bin/pygbag --width 800 --height 600 --ume_block=0 tmp
web-pack: pre-web
venv/bin/pygbag \
--width 800 \
--height 600 \
--ume_block=0 \
--archive \
tmp
pre-web: prod
rm -rf tmp
mkdir tmp
cp -r space_war tmp
mv tmp/space_war/main.py tmp
# venv setup and requirements.txt installed
venv/venv_created: requirements.txt
test -d venv || python -m venv venv
touch venv/venv_created
# Install requirements.txt to venv
venv/dev_installed: venv/venv_created requirements-dev.txt setup.py
venv/bin/pip install -e .[dev]
touch venv/dev_installed
# Install the wheel in "production"
venv/wheel_installed: venv/venv_created setup.py space_war/**/*.py space_war/sim/assets/**
venv/bin/pip install .[build]
touch venv/wheel_installed
clean:
rm -rf ./**/*/__pycache__
rm -rf ./build
rm -rf ./tmp
rm -rf ./venv
rm -rf *.egg-info
########################################################
# Development
########################################################
format: dev
venv/bin/black --line-length 80 space_war
lint: dev
venv/bin/pylint --extension-pkg-whitelist=pygame space_war
venv/bin/flake8 space_war
venv/bin/isort space_war