# 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