-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (32 loc) · 1012 Bytes
/
Makefile
File metadata and controls
41 lines (32 loc) · 1012 Bytes
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
# Variables
VENV = venv
PYTHON = $(VENV)/bin/python3
PIP = $(VENV)/bin/pip
PYINSTALLER = $(VENV)/bin/pyinstaller
APP_NAME = ZettelCompose
PYINSTALLER = $(PYTHON) -m PyInstaller
.PHONY: all install clean bundle help
all: help
help:
@echo "Available commands:"
@echo " make install - Create venv and install dependencies"
@echo " make bundle - Create a standalone macOS .app bundle"
@echo " make clean - Remove build artifacts and venv"
$(VENV)/bin/activate: requirements.txt
python3 -m venv $(VENV)
$(PIP) install --upgrade pip
$(PIP) install -r requirements.txt
touch $(VENV)/bin/activate
install: $(VENV)/bin/activate
bundle: install
@echo "Building macOS Bundle..."
$(PYINSTALLER) --noconfirm --onefile --windowed \
--name $(APP_NAME) \
--collect-all bleak \
--hidden-import bleak.backends.macos.backend \
zettel-compose.py
@echo "Bundle created at dist/$(APP_NAME).app"
clean:
rm -rf $(VENV) build dist
rm -f *.spec
find . -type d -name "__pycache__" -exec rm -rf {} +