Files
lintunes/packaging/mac/rthook_certifi.py
T
trav f21c31940f
macOS / Tests (AppleSilicon) (push) Canceled after 0s
macOS / Tests (Intel) (push) Canceled after 0s
macOS / Build (AppleSilicon) (push) Canceled after 0s
macOS / Build (Intel) (push) Canceled after 0s
macOS / Publish the GitHub Release (push) Canceled after 0s
v0.97.0: macOS port (Round 129): OS-aware paths, config and cookies; Mac now-playing, packaging (PyInstaller .app, dmg build, signing notes, CI workflow) and docs
2026-11-17 22:41:48 -08:00

15 lines
591 B
Python

# PyInstaller runtime hook: give the frozen app's OpenSSL a CA bundle.
#
# A Python built for macOS asks OpenSSL for certificates in its own
# framework folder, which the .app doesn't have, so every https request
# made with plain urllib (the Spleeter and cliairplay downloads) would fail
# with CERTIFICATE_VERIFY_FAILED. requests brings certifi; point OpenSSL at
# its bundle unless the user already chose one.
import os
try:
import certifi
os.environ.setdefault("SSL_CERT_FILE", certifi.where())
except Exception: # noqa: BLE001 — no certifi: leave OpenSSL's default
pass