-
Notifications
You must be signed in to change notification settings - Fork 3
/
makefile
59 lines (48 loc) · 1.4 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
SHELL := /bin/bash
PYTHON = python3
TEST_PATH = ./tests/
FLAKE8_EXCLUDE = .venv,.eggs,.tox,.git,__pycache__,*.pyc
all:
clean install test
check:
${PYTHON} -m flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude ${FLAKE8_EXCLUDE}
${PYTHON} -m flake8 . --count --exit-zero --max-complexity=10 --max-line-length=79 --statistics --exclude ${FLAKE8_EXCLUDE}
clean:
@find . -name '*.pyc' -exec rm --force {} +
@find . -name '*.pyo' -exec rm --force {} +
@find . -name '*~' -exec rm --force {} +
rm -rf build
rm -rf dist
rm -rf *.egg-info
rm -f *.sqlite
rm -rf .cache
build: clean
@python -m build
deploy: dist
@echo "-------------------- sending to pypi server ------------------------"
@twine upload dist/*
help:
@echo "---------------------------- help --------------------------------------"
@echo " clean"
@echo " Remove python artifacts and build artifacts."
@echo " build"
@echo " Generate the distribution."
@echo " deploy"
@echo " Deploy on pypi.org."
@echo " check"
@echo " Check style with flake8."
@echo " black"
@echo " Run black"
@echo " install"
@echo " Install xradios"
@echo " install-dev"
@echo " Create dev setup."
install:
pip install --upgrade pip
pip install -e .
install-dev:
pip install --upgrade pip
pip install -e .[dev]
pre-commit install
test:
${PYTHON} -m pytest ${TEST_PATH}