-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathploneapi_shell.spec
More file actions
118 lines (107 loc) · 2.88 KB
/
ploneapi_shell.spec
File metadata and controls
118 lines (107 loc) · 2.88 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# -*- mode: python ; coding: utf-8 -*-
"""
PyInstaller spec file for Plone API Shell Streamlit app.
"""
import sys
from pathlib import Path
# Get the project root directory
project_root = Path(SPECPATH).parent
# Collect all data files needed
media_path = project_root / "media"
ploneapi_path = project_root / "ploneapi_shell"
datas = []
if media_path.exists():
datas.append((str(media_path), "media"))
if ploneapi_path.exists():
# Include the entire ploneapi_shell package as data
# This ensures web.py and other files are available
datas.append((str(ploneapi_path), "ploneapi_shell"))
# Hidden imports that PyInstaller might miss
hiddenimports = [
'streamlit',
'streamlit.web.cli',
'streamlit.runtime.scriptrunner',
'streamlit.runtime.state',
'streamlit.runtime.caching',
'streamlit.components.v1',
'ploneapi_shell',
'ploneapi_shell.api',
'ploneapi_shell.web',
'httpx',
'typer',
'rich',
'prompt_toolkit',
'thefuzz',
'pandas',
'altair',
'plotly',
'pyarrow',
'tornado',
'watchdog',
'click',
'pyyaml',
'toml',
'protobuf',
'numpy',
'pillow',
'blinker',
'cachetools',
'packaging',
'python-dateutil',
'pytz',
]
a = Analysis(
['ploneapi_shell/streamlit_launcher.py'],
pathex=[str(project_root)],
binaries=[],
datas=datas,
hiddenimports=hiddenimports,
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
noarchive=False,
optimize=0,
)
pyz = PYZ(a.pure)
# Get code signing identity from environment variable or use None
import os
codesign_identity = os.environ.get('CODESIGN_IDENTITY', None)
entitlements_file = os.environ.get('ENTITLEMENTS_FILE', None)
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.datas,
[],
name='PloneAPIShell',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True, # Set to False for windowed app, True for console
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=codesign_identity,
entitlements_file=entitlements_file,
icon=str(project_root / "media" / "plone-logo.icns") if (project_root / "media" / "plone-logo.icns").exists() else None,
)
# Create macOS app bundle
app = BUNDLE(
exe,
name='PloneAPIShell.app',
icon=str(project_root / "media" / "plone-logo.icns") if (project_root / "media" / "plone-logo.icns").exists() else None,
bundle_identifier='com.ploneapi.shell',
codesign_identity=codesign_identity,
info_plist={
'NSPrincipalClass': 'NSApplication',
'NSHighResolutionCapable': 'True',
'CFBundleShortVersionString': '0.1.9',
'CFBundleVersion': '0.1.9',
'NSHumanReadableCopyright': 'Copyright © 2025 David Bain',
'LSMinimumSystemVersion': '10.13',
},
)