2023-03-17 08:07:53 +00:00
|
|
|
PACKAGEVERSION="`python3 setup.py --version`"
|
|
|
|
|
2023-03-16 20:19:42 +00:00
|
|
|
all: test build-docs
|
|
|
|
|
2022-01-13 22:29:47 +00:00
|
|
|
test: update-test-data
|
2022-01-07 20:09:45 +00:00
|
|
|
python3 -m unittest discover -s tests
|
2018-11-13 12:38:26 +00:00
|
|
|
|
2023-03-16 20:19:42 +00:00
|
|
|
build-docs:
|
2023-03-17 08:07:53 +00:00
|
|
|
mkdocs build -d ../../python/$(PACKAGEVERSION)
|
|
|
|
./update-doc-versions.sh
|
2023-03-16 20:19:42 +00:00
|
|
|
|
2023-03-16 23:22:24 +00:00
|
|
|
serve-docs:
|
|
|
|
mkdocs serve
|
|
|
|
|
2022-01-13 22:29:47 +00:00
|
|
|
coverage: update-test-data
|
2022-01-07 20:09:45 +00:00
|
|
|
python3-coverage run --branch -m unittest discover -s tests
|
2018-11-13 12:38:26 +00:00
|
|
|
python3-coverage html
|
2018-11-15 06:55:12 +00:00
|
|
|
|
2022-01-13 22:29:47 +00:00
|
|
|
update-test-data:
|
|
|
|
rsync ../../tests/samples.bin ../../tests/samples.pr tests
|
|
|
|
|
2022-02-11 10:57:29 +00:00
|
|
|
tag:
|
2023-03-17 08:07:53 +00:00
|
|
|
git tag python-preserves@$(PACKAGEVERSION)
|
2022-02-11 10:57:29 +00:00
|
|
|
|
2018-11-15 06:55:12 +00:00
|
|
|
clean:
|
|
|
|
rm -rf htmlcov
|
2018-11-15 07:09:35 +00:00
|
|
|
find . -iname __pycache__ -o -iname '*.pyc' | xargs rm -rf
|
2018-11-15 06:55:12 +00:00
|
|
|
rm -f .coverage
|
2018-11-15 07:09:35 +00:00
|
|
|
rm -rf preserves.egg-info build dist
|
|
|
|
|
2022-01-07 20:09:45 +00:00
|
|
|
#
|
|
|
|
# sudo apt install python3-wheel twine
|
|
|
|
#
|
2021-11-30 17:41:34 +00:00
|
|
|
publish: clean build
|
2018-11-15 07:09:35 +00:00
|
|
|
twine upload dist/*
|
2021-11-30 17:41:34 +00:00
|
|
|
|
2023-03-17 08:07:53 +00:00
|
|
|
build: build-docs
|
2021-11-30 17:41:34 +00:00
|
|
|
python3 setup.py sdist bdist_wheel
|