X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=Makefile;fp=Makefile;h=cc5723b4e1e2d95134aa984c4a1ad0cec569bab2;hb=7b4791cfb73136db35160989c08660db55c3c34e;hp=0000000000000000000000000000000000000000;hpb=b45837641542cf18e2410dcbaa7ecba1bdc3905d;p=perso%2FImmae%2FProjets%2FPython%2FMusicSampler.git diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..cc5723b --- /dev/null +++ b/Makefile @@ -0,0 +1,42 @@ +install: + poetry install + +build: + msgfmt music_sampler/locales/fr/LC_MESSAGES/music_sampler.po -o music_sampler/locales/fr/LC_MESSAGES/music_sampler.mo + +run: install build + poetry run python run.py + +BUNDLER ?= shiv +bundle: install build + $(MAKE) bundle-$(BUNDLER) + +bundle-shiv: + if [ -f music_sampler.pyz ]; then rm music_sampler.pyz; fi + git add -f music_sampler/locales/fr/LC_MESSAGES/music_sampler.mo + poetry run shiv --output-file=music_sampler.pyz --site-packages=$(shell poetry env info -p)/lib/python3.9/site-packages --python="/usr/bin/env python3" --entry-point=music_sampler.app.main --no-deps ./. + git restore --staged music_sampler/locales/fr/LC_MESSAGES/music_sampler.mo + +bundle-pyinstaller: + poetry run pyinstaller music_sampler.spec + +PACKAGER ?= poetry + +package: install build + git describe --exact-match --tags + $(MAKE) package-$(PACKAGER) + +package-setup: + poetry run python setup.py sdist + +package-poetry: + poetry version $(shell git describe --exact-match --tags) + poetry build + +publish: package publish-$(PACKAGER) + +publish-setup: + poetry run python setup.py upload + +publish-poetry: + poetry publish