-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
76 lines (60 loc) · 2.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
66
67
68
69
70
71
72
73
74
75
76
#!/usr/bin/make -f
-include Makefile.local
ifndef PYTHON
PYTHON:=python3
endif
VERSION := $(shell grep -m 1 version pyproject.toml | tr -s ' ' | tr -d '"' | tr -d "'" | cut -d' ' -f3)
.PHONY: venv tests
clean:
rm -rf build extract_tar extract_tar_
rm -rf .pytest_cache .ruff_cache
rm -f pycoffer_static.bin
venv:
${PYTHON} -m venv venv
./venv/bin/pip install -e .
./venv/bin/pip install .[test]
./venv/bin/pip install .[cli]
./venv/bin/pip install .[fido]
./venv/bin/pip install .[build]
./venv/bin/pip install .[doc]
./venv/bin/pip install ../FernetFile -e .
./venv/bin/pip install ../NaclFile -e .
./venv/bin/pip install ../AesFile -e .
./venv/bin/pip install ../CofferFile -e .
venv_nuitka:
python3 -m venv venv_nuitka
./venv_nuitka/bin/pip install --upgrade pip
./venv_nuitka/bin/pip install -e .
./venv_nuitka/bin/pip install -e .[cli]
./venv_nuitka/bin/pip install -e .[binaries]
./venv_nuitka/bin/pip install -e ../FernetFile
./venv_nuitka/bin/pip install -e ../AeslFile
./venv_nuitka/bin/pip install -e ../NaclFile
./venv_nuitka/bin/pip install -e ../CofferFile
pycoffer_static.bin: venv_nuitka
#~ ./venv_nuitka/bin/nuitka --show-progress --remove-output --include-package=pycoffer --include-package=cofferfile --include-package=fernetfile --include-package=naclfile --onefile ./venv_nuitka/bin/pycoffer --output-dir=
./venv_nuitka/bin/nuitka --include-distribution-metadata=pycoffer --include-distribution-metadata=cofferfile --include-distribution-metadata=aesfile --include-distribution-metadata=naclfile --remove-output --onefile ./venv_nuitka/bin/pycoffer_static --output-dir=
build:
rm -rf dist
./venv/bin/python3 -m build
testpypi:
./venv/bin/python3 -m twine upload --repository testpypi --verbose dist/*
apidoc:
./venv/bin/sphinx-apidoc --output-dir docs/api --force pycoffer
git checkout docs/api/modules.rst
doc:
cd docs && make html
pypi:
./venv/bin/python3 -m twine upload --repository pypi --verbose dist/*
ruff:
./venv/bin/ruff check pycoffer/
bandit:
./venv/bin/bandit -r pycoffer
tests:
./venv/bin/pytest --random-order -n auto --ignore=tests/test_benchmark.py tests/
benchmark:
./venv/bin/pip install .[benchmark]
./venv/bin/pytest tests/test_benchmark.py
release:
-git push
gh release create v${VERSION}