-
Notifications
You must be signed in to change notification settings - Fork 82
/
Copy pathmakefile
33 lines (26 loc) · 887 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
SHELL := bash
.DELETE_ON_ERROR:
.SHELLFLAGS := -ceu
MAKEFLAGS += --no-builtin-rules \
--warn-undefined-variables
.PHONY: dist pytest test
dist:
if ! python3 -m pip freeze | grep -q build; then python3 -m pip install --upgrade build; fi
python3 -m build --outdir=dist --sdist --wheel ./
install_dev:
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade --editable=./
upload:
if ! python3 -m pip freeze | grep -q twine; then python3 -m pip install --upgrade twine; fi
python3 -m twine upload dist/*
clean:
rm -rf ./build/*
rm -rf ./dist/*
rm -rf ./.mypy_cache
rm -rf ./.pytest_cache
pytest:
if ! command -v pytest &>/dev/null; then python3 -m pip install --upgrade pytest; fi
pytest test
test:
if ! command -v nosetests &>/dev/null; then python3 -m pip install --upgrade nose; fi
nosetests test