Repository navigation
Expand file tree
/
Copy pathmakefile.dev
More file actions
72 lines (56 loc) · 1.4 KB
/
Copy pathmakefile.dev
File metadata and controls
72 lines (56 loc) · 1.4 KB
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
default: build
config:
VERSION := $(shell cat ../VERSION)
setup:
@echo "Updating pyproject.toml to $(VERSION)"
sed -i -E 's/^(version *= *")[^"]*(")/\1$(VERSION)\2/' pyproject.toml
build:
.PHONY: %.t
run-test:
./jsonfold.py --demo
./cli.py --demo
./benchmark.py 10
cd ../tests/unit && ../run_tests.sh -mpython
cd ../tests/samples && ../run_tests.sh -mpython
cd ../tests/future && ../run_tests.sh -mpython
test:
$(MAKE) run-test > test.log
package:
rm -rf dist
$(PYTHON) -m build
twine check dist/*
T=tmp
setup-verify:
rm -rf $T
mkdir -p $T
python3 -m pip install --no-deps --target $T dist/jsonfold-*.whl
R=run
run-verify:
rm -rf $R
mkdir -p $R
cd $R && python3 -S -c 'import runpy ; import os ; runpy.run_path("${CURDIR}/api_test.py", run_name="__main__")'
cd $R && python3 -S -m runpy jsonfold --demo
cd $R && python3 -S -m runpy cli --demo
cd $R && python3 -S -c 'import runpy ; import os ; runpy.run_path("${CURDIR}/benchmark.py", run_name="__main__")' 10
verify:
$(MAKE) setup-verify
PYTHONPATH=$(CURDIR)/$T $(MAKE) run-verify > verify.log
wc verify.log
echo "Passed: $@"
publish:
twine upload dist/*
benchmark:
./run_benchmark.sh
clean:
rm -rf dist *.egg-info
realclean: clean
rm -f *.out *.prof *.lprof *.cover
rm -rf __pycache__ .pytest_cache .mypy_cache .coverage htmlcov .venv
world:
make realclean
make setup
make build
make test
make benchmark
make package
make verify