Changed from onedir to one file to fix pyinstaller workflow

This commit is contained in:
Warezpeddler
2026-05-05 11:00:59 +01:00
parent 2adb75fc0d
commit a67459e7e0
2 changed files with 10 additions and 28 deletions

View File

@@ -1,5 +1,5 @@
# PyInstaller spec: `pip install -e ".[bundle]"` then `pyinstaller applepy.spec`
# Produces dist/applepy (one-folder) with bundled applepy data (JSON, optional compliance trees).
# Produces dist/applepy (single self-contained binary) with bundled applepy data (JSON, optional compliance trees).
# Run scripts/vendor_compliance_assets.sh before building to embed mSCP + Lynis (not in git).
from pathlib import Path
@@ -11,12 +11,7 @@ _SPEC_DIR = Path(SPECPATH)
def _mscp_data_files_excluding_generated(mscp: Path) -> list[tuple[str, str]]:
"""
Per-file datas for mSCP: omit ``build/`` (output from generate_guidance on the host) and ``.git``.
Shipping ``build/`` bloats the bundle and, after ``sudo dist/.../applepy``, can leave root-owned
trees that break the next PyInstaller clean of ``dist/applepy``.
"""
"""Per-file datas for mSCP: omit ``build/`` (generate_guidance output) and ``.git``."""
prefix = Path("applepy/data/macos_security")
out: list[tuple[str, str]] = []
for p in mscp.rglob("*"):
@@ -97,8 +92,10 @@ pyz = PYZ(a.pure)
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.datas,
[],
exclude_binaries=True,
exclude_binaries=False,
name="applepy",
debug=False,
bootloader_ignore_signals=False,
@@ -111,11 +108,3 @@ exe = EXE(
codesign_identity=None,
entitlements_file=None,
)
coll = COLLECT(
exe,
a.binaries,
a.datas,
strip=False,
upx=False,
name="applepy",
)