-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
65 lines (47 loc) · 1.23 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
65
PYTHON_BIN ?= python3
PIP_BIN ?= pip3
# to actually create the distribution package, use the setuptools.build_meta
# pyproject.toml-capable backend
.PHONY: dist
dist: clean-dist
@if ! $(PIP_BIN) show 'build' >/dev/null 2>&1; then \
echo "ERROR: python 'build' package is required (hint: $(PIP_BIN) install build)"; \
exit 1; \
fi
$(PYTHON_BIN) -m build -n
.PHONY: clean-dist
clean-dist:
rm -rf dist build
.PHONY: upload-prod
upload-prod: dist
twine upload --repository tdvutil --skip-existing dist/*
.PHONY: upload-test
upload-test: dist
twine upload --repository tdvutil_test --skip-existing dist/*
.PHONY: docs
docs:
cd docs && make html
.PHONY: clean-docs
clean-docs:
cd docs && make clean
# just use normal pip (with an empty setup.cfg) for local and editable installs
.PHONY: install
install:
$(PIP_BIN) install .
.PHONY: localdev
localdev:
$(PIP_BIN) install --editable .
.PHONY: test
test:
@pytest
# .PHONY: clean
# clean:
# rm -rf ./$(OUTDIR)/* ./$(WOWDUMP_OUTDIR)/* ./$(DEPS_DIR)/*.*P ./$(DEPS_DIR)/*.d
# .PHONY: realclean
# realclean: clean
# rm -rf dist build */*.egg-info *.egg-info
.PHONY: clean
clean: clean-docs clean-dist
rm -rf */*.egg-info *.egg-info
# helpful for debugging
print-%: ;@echo $*=$($*)