aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: cc5723b4e1e2d95134aa984c4a1ad0cec569bab2 (plain) (blame)
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
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