-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
51 lines (41 loc) · 1.01 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
env := .env
$(env):
python3 -m venv $(@)
$(env)/bin/pip install --upgrade pip build twine
$(env)/bin/pip install -e .
.PHONY: test
test: ## Run tests
test: test-bin test-install
.PHONY: test-bin
test-bin: | $(env)
$(env)/bin/zkpwgen --help
$(env)/bin/zkpwgen
.PHONY: test-install
test-install:
python3 -m venv $(env)-test
$(env)-test/bin/pip install --no-deps zkpwgen
$(env)-test/bin/zkpwgen --help
rm -rf $(env)-test
.PHONY: clean
clean: ## Clean up build artifacts
rm -rf dist $(env)-test
.PHONY: clobber
clobber: ## Remove all build artifacts and virtualenv
clobber: clean
rm -rf $(env)
.PHONY: build
build: ## Build package
build: dist | $(env)
dist: | $(env)
$(env)/bin/python3 -m build
.PHONY: publish
publish: ## Publish package to PyPI
publish: build | $(env)
$(env)/bin/twine upload dist/*
.PHONY: help
help: ## Show this help text
$(info usage: make [target])
$(info )
$(info Available targets:)
@awk -F ':.*?## *' '/^[^\t].+?:.*?##/ \
{printf " %-24s %s\n", $$1, $$2}' $(MAKEFILE_LIST)