Skip to content

Commit 788a424

Browse files
authored
Refactor StaTube.spec for project root handling
Updated the PyInstaller spec for StaTube to use the current working directory as the project root and removed unnecessary comments and options.
1 parent 172a976 commit 788a424

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

build/pyinstaller/StaTube.spec

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
# PyInstaller spec for StaTube (PySide6, single-file EXE)
2-
31
from PyInstaller.utils.hooks import collect_all
42
from pathlib import Path
53

64
block_cipher = None
75

8-
# ---- Resolve project root safely ----
9-
SPEC_FILE = Path(globals()["__specfile__"]).resolve()
10-
ROOT_DIR = SPEC_FILE.parents[2]
6+
# PyInstaller always runs with CWD = repo root
7+
ROOT_DIR = Path.cwd()
118

129
# ---- Collect PySide6 ----
1310
pyside6_datas, pyside6_binaries, pyside6_hiddenimports = collect_all("PySide6")
@@ -39,8 +36,6 @@ a = Analysis(
3936
*wordcloud_hiddenimports,
4037
"scrapetube",
4138
],
42-
hookspath=[],
43-
runtime_hooks=[],
4439
excludes=[],
4540
cipher=block_cipher,
4641
)
@@ -55,9 +50,6 @@ exe = EXE(
5550
a.datas,
5651
[],
5752
name="StaTube",
58-
debug=False,
59-
strip=False,
60-
upx=True,
6153
console=False,
6254
icon=str(ROOT_DIR / "assets" / "icon" / "StaTube.ico"),
6355
)

0 commit comments

Comments
 (0)