-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
65 lines (44 loc) · 1.34 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
version := $(shell awk '/version = /{print $$3}' pyproject.toml | tr -d '"')
new_version := $(shell echo $(version) | awk -F . '{OFS="."; $$NF+=1; print}')
.PHONY: activate deps db version upload-production upload-test build build-sdist sign check test clean console load devel docs
activate:
@echo run this: source bin/activate
deactivate:
@echo run this: deactivate
deps:
pip install build
db: compile_commands.json
compile_commands.json:
bear -- python setup.py build
bump_version:
sed -e 's/version = "$(version)"/version = "$(new_version)"/' -i '' pyproject.toml
version:
@echo $(version)
upload-production: build sign
python -m twine upload --repository pypi dist/*$(version)*
git tag --sign $(version) -m $(version)
git push origin $(version)
upload-test: build
python -m twine upload --repository testpypi dist/*$(version)*
build:
python -m build
build-sdist:
python -m build --sdist
sign:
gpg --detach-sign -a dist/*.tar.gz
check:
python setup.py check
types:
pyright --verifytypes getargv
pyright
test: devel
python tests/testgetargv.py
clean:
rm -rf build dist getargv.egg-info src/getargv.egg-info MANIFEST src/_getargv.cpython-*-darwin.so .cache .mypy_cache getargv.html
console load: devel
python -ic 'import getargv'
devel:
pip install --editable .
getargv.html: devel
python -m pydoc -w getargv
docs: getargv.html