build: exclude __pycache__ from pyz (-68 KB)
CI / test (3.10) (push) Successful in 8s
CI / test (3.11) (push) Successful in 7s
CI / test (3.12) (push) Successful in 7s
CI / build-pyz (push) Successful in 4s
CI / release (push) Has been skipped

Switch from 'cp -r cloud_sync' to 'cp cloud_sync/*.py' so .pyc files
from a prior dev run don't get embedded. Pyz shrinks 112 KB -> 44 KB.
This commit is contained in:
2026-06-04 23:20:02 +02:00
parent d4c76a4e37
commit ff96bf4b70
+2 -2
View File
@@ -16,8 +16,8 @@ build: cloud-sync.pyz
# point zipapp at that staging dir. # point zipapp at that staging dir.
cloud-sync.pyz: cloud_sync/__main__.py $(wildcard cloud_sync/*.py) cloud-sync.pyz: cloud_sync/__main__.py $(wildcard cloud_sync/*.py)
rm -rf build/pyz rm -rf build/pyz
mkdir -p build/pyz mkdir -p build/pyz/cloud_sync
cp -r cloud_sync build/pyz/ cp cloud_sync/*.py build/pyz/cloud_sync/
$(PY) -m zipapp build/pyz -p "/usr/bin/env $(PY)" \ $(PY) -m zipapp build/pyz -p "/usr/bin/env $(PY)" \
-m cloud_sync.cli:main -o $@ -m cloud_sync.cli:main -o $@
rm -rf build/pyz rm -rf build/pyz