diff --git a/scripts/MediaHive.spec b/scripts/MediaHive.spec index 30ae419..9d36c6f 100644 --- a/scripts/MediaHive.spec +++ b/scripts/MediaHive.spec @@ -123,6 +123,11 @@ exe = EXE( windowed=True, ) +# UPX breaks .NET assemblies: packing Python.Runtime.dll strips/corrupts its +# CLR metadata and pythonnet then fails with "Failed to resolve +# Python.Runtime.Loader.Initialize from .../Python.Runtime.dll". +_upx_exclude = ["Python.Runtime.dll"] if sys.platform == "win32" else [] + coll = COLLECT( exe, a.binaries, @@ -130,7 +135,7 @@ coll = COLLECT( a.datas, strip=False, upx=True, - upx_exclude=[], + upx_exclude=_upx_exclude, name="MediaHive", )