Skip to content

Commit ecd2973

Browse files
committed
Add the pagertree spec file
1 parent 10e021f commit ecd2973

File tree

2 files changed

+53
-1
lines changed

2 files changed

+53
-1
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ env/
1919
.env
2020

2121
# PyInstaller (if you package it as an executable, as mentioned earlier)
22-
*.spec
2322
dist/
2423
build/
2524

pagertree.spec

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
import os
2+
import inspect
3+
import pkgutil
4+
import importlib
5+
6+
# Dynamically collect all submodules in 'commands'
7+
# Use the directory of this spec file to locate 'commands/'
8+
spec_dir = os.path.dirname(os.path.abspath(inspect.getfile(lambda: None)))
9+
commands_dir = os.path.join(spec_dir, "commands")
10+
11+
# Dynamically collect all submodules in 'commands'
12+
hiddenimports = []
13+
for _, module_name, _ in pkgutil.iter_modules([commands_dir]):
14+
hiddenimports.append(f"commands.{module_name}")
15+
16+
# Debugging: Print the collected modules to verify
17+
print("Hidden imports from 'commands':", hiddenimports)
18+
19+
a = Analysis(
20+
['pagertree.py'],
21+
pathex=[spec_dir], # Add spec_dir to pathex to ensure module resolution
22+
binaries=[],
23+
datas=[],
24+
hiddenimports=hiddenimports,
25+
hookspath=[],
26+
hooksconfig={},
27+
runtime_hooks=[],
28+
excludes=[],
29+
noarchive=False,
30+
optimize=0,
31+
)
32+
pyz = PYZ(a.pure)
33+
34+
exe = EXE(
35+
pyz,
36+
a.scripts,
37+
a.binaries,
38+
a.datas,
39+
[],
40+
name='pagertree',
41+
debug=False,
42+
bootloader_ignore_signals=False,
43+
strip=False,
44+
upx=True,
45+
upx_exclude=[],
46+
runtime_tmpdir=None,
47+
console=True,
48+
disable_windowed_traceback=False,
49+
argv_emulation=False,
50+
target_arch=None,
51+
codesign_identity=None,
52+
entitlements_file=None,
53+
)

0 commit comments

Comments
 (0)