-
-
Notifications
You must be signed in to change notification settings - Fork 37
/
Makefile
38 lines (29 loc) · 1002 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
VIRTUALENV := python3 -m venv
## help - Display help about make targets for this Makefile
help:
@cat Makefile | grep '^## ' --color=never | cut -c4- | sed -e "`printf 's/ - /\t- /;'`" | column -s "`printf '\t'`" -t
## venv - Install the virtual environment
venv:
$(VIRTUALENV) ~/.venv/python_project/
ln -snf ~/.venv/python_project/ venv
venv/bin/pip install -e '.[dev]'
## activate - Activate venv
activate:
source venv/bin/activate
## install - Install the project locally
install: | venv
## clean - Remove the virtual environment and clear out .pyc files
clean:
rm -rf ~/.venv/python_project/ venv
find . -name '*.pyc' -delete
rm -rf dist
rm -rf build
rm -rf *.egg-info
## lint - Lint the project
lint:
flake8 Hector9000/*.py --count --select=E1,E2,E9,F63,F7,F82 --show-source --statistics
#venv/bin/flake8 tests/*.py --count --select=E1,E2,E9,F63,F7,F82 --show-source --statistics
## test - Test the project
test:
python -m pytest
.PHONY: help install clean lint test activate