My spec file:

a = Analysis(
['switch_cc_tool.py'],
pathex=[],
binaries=[],
datas=[('*data*', '**'),
('**', '**data**')],
hiddenimports=['textual.widgets._tab_pane','yaml','lxml','jinja2'],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=['pkg_resources'],
noarchive=False,
optimize=0,
)
pyz = PYZ(a.pure)

exe = EXE(
pyz,
a.scripts,
a.binaries,
a.datas,
[],
name='myapp',
debug=True,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
)
app = BUNDLE(
exe,
name='myApp.app',
icon=None,
bundle_identifier = 'com.mycompany.myapp',
info_plist = {
'CFBundleIdentifier' : 'com.mycompany.myapp',
'CFBundleDisplayName' : 'MyApp',
'CFBundleName' : 'MyApp',
'CFBundleExecutable' : 'my_app',
'CFBundlePackageType' : 'APPL',
'LSBackgroundOnly' : False
}
)



On Wednesday, September 24, 2025 at 3:14:48 PM UTC-6 Zoe Cheimets wrote:

> Hi, 
>
> I am a new PyInstaller user trying to create a signed and notarized 
> textual app for distribution outside of the App Store. I'm able to create a 
> working executable for Windows and Linux, but having trouble with the .app 
> bundle aspect of MacOS. 
>
> The executable itself works on my Mac, even running 
> MyApp.app/Contents/MacOS/myexecutable works after compiling the bundle with 
> PyInstaller. However, double clicking on MyApp, or running `open MyApp.app` 
> in the terminal results in my app timing out and/or crashing. This is the 
> same behavior whether I sign and notarize or not. 
>
> I use my own .spec file and entitlements file. The entitlements file only 
> sets com.apple.security.cs.allow-jit 
> and com.apple.security.cs.allow-unsigned-executable-memory to true. 
>
> The Console logs have not been very helpful. Here are a few that I think 
> are of note:
>
>    1. 
>    
>    failed to fetch **.app/Contents/_CodeSignature/CodeRequirements-1 
>    error=-10
>    2. 
>    
>    found no value for key NSDoubleLocalizedStrings in 
>    CFPrefsSearchListSource<0x114f0a160> (Domain: com.**.**, Container: (null))
>    3. 
>    
>    Launch Services encountered an error, converting to OSStatus -43: 
>    Error Domain=NSCocoaErrorDomain Code=260 "The file “Library” couldn’t be 
>    opened because there is no such file." UserInfo={NSURL=Library/ -- 
>    file:/**app/Contents/, NSFilePath=**.app/Contents/Library, 
>    NSUnderlyingError=0x9d417ea30 {Error Domain=NSPOSIXErrorDomain Code=2 "No 
>    such file or directory"}}
>    
> I replaced any private information with **! 
>
> Grateful for any help! Thanks!
>

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/pyinstaller/86159817-8b34-47d6-862e-0fa6f3d820f1n%40googlegroups.com.

Reply via email to