Skip to content

Commit a21e475

Browse files
authored
CM-70014 added macOS openssl 3 handling to pyinstaller spec
1 parent 30c923c commit a21e475

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

pyinstaller.spec

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,24 @@ _hiddenimports = [
3737
'cycode.cli.apps.mcp',
3838
]
3939

40+
# Handle binaries additions
41+
extra_binaries = []
42+
if platform.system() == "Darwin":
43+
try:
44+
brew_openssl = subprocess.check_output(["brew", "--prefix", "openssl@3"]).decode().strip()
45+
openssl_lib = os.path.join(brew_openssl, "lib")
46+
extra_binaries.extend([
47+
(os.path.join(openssl_lib, "libssl.3.dylib"), "."),
48+
(os.path.join(openssl_lib, "libcrypto.3.dylib"), "."),
49+
])
50+
except Exception as e:
51+
print(f"Warning: Could not locate Homebrew OpenSSL: {e}")
52+
4053
a = Analysis(
4154
scripts=['cycode/cli/main.py'],
4255
excludes=['tests', 'setuptools', 'pkg_resources'],
4356
hiddenimports=_hiddenimports,
57+
binaries=extra_binaries,
4458
)
4559

4660
exe_args = [PYZ(a.pure), a.scripts, a.binaries, a.datas]

0 commit comments

Comments
 (0)