Skip to content

Commit

Permalink
makefile python tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
irmen committed Jul 18, 2024
1 parent 397fa11 commit 9978980
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
.PHONY: all win_dist dist upload
PYTHON?=python3

all:
@echo "Targets: clean, test, docs, dist, win_wheels, linux_wheel, check_upload, upload"

clean:
rm -f dist/* *.so *.pyd a.out
python setup.py clean --all
${PYTHON} setup.py clean --all

test:
rm -f *.so *.pyd
python setup.py clean
python setup.py build
python setup.py test
python -m pytest -v tests
${PYTHON} setup.py clean
${PYTHON} setup.py build
${PYTHON} setup.py test
${PYTHON} -m pytest -v tests
# mypy --follow-imports skip miniaudio.py

docs:
@python -c 'import setup; setup.make_md_docs("miniaudio")'
@${PYTHON} -c 'import setup; setup.make_md_docs("miniaudio")'

win_wheels: test
cmd /C del /q dist\*
Expand All @@ -31,16 +32,16 @@ win_wheels: test

linux_wheel: test
rm -f dist/* *.so
python setup.py bdist_wheel
${PYTHON} setup.py bdist_wheel
@echo
@echo
@echo "REMEMBER: the Linux wheel may be very system/cpu dependent so should you really use this? Beware."
@echo

dist: test
rm -f dist/* *.so
python setup.py clean
python setup.py sdist
${PYTHON} setup.py clean
${PYTHON} setup.py sdist

upload: check_upload
twine upload dist/*
Expand Down

0 comments on commit 9978980

Please sign in to comment.