-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
34 lines (28 loc) · 865 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
# Build, package, test, and clean
PROJECT=sphinx_gmt
FORMAT_FILES=$(PROJECT) setup.py doc/conf.py
LINT_FILES=$(PROJECT) setup.py
help:
@echo "Commands:"
@echo ""
@echo " install install in editable mode"
@echo " package build source and wheel distributions"
@echo " check run code quality checks (black and pylint)"
@echo " format run black to automatically format the code"
@echo " clean clean up build and generated files"
@echo ""
install:
pip install --no-deps -e .
package:
python -m build --sdist --wheel
format:
black $(FORMAT_FILES)
check:
black --check $(FORMAT_FILES)
pylint $(LINT_FILES)
clean:
find . -name "*.pyc" -exec rm -v {} \;
find . -type d -name "__pycache__" -exec rm -rv {} +
rm -rvf build dist MANIFEST *.egg-info .coverage .cache
rm -rvf $(TESTDIR)
rm -rvf baseline