diff --git a/nix/build-all.py b/nix/build-all.py index f5436262d2..a4e261fc70 100644 --- a/nix/build-all.py +++ b/nix/build-all.py @@ -1094,10 +1094,19 @@ if "python" in targets and not USE_CURRENT_PYTHON_VERSION and "wasm" not in flag f"http://www.python.org/ftp/python/{PYTHON_VERSION}/", f"Python-{PYTHON_VERSION}.tgz", ) - python_bin = INSTALL_DIR / f"python-{PYTHON_VERSION}" / "bin" / "python3" + python_install = INSTALL_DIR / f"python-{PYTHON_VERSION}" + python_bin = python_install / "bin" / "python3" # `_ssl` module is present -> we will be able to install `numpy` later # to verify IfcOpenShell installation - run([str(python_bin), "-c", "import _ssl"]) + try: + run([str(python_bin), "-c", "import _ssl"]) + except RuntimeError: + print( + "ERROR: Python was built without SSL support (_ssl module is missing). " + f"To fix this: remove the installed Python at {python_install}; " + "install OpenSSL development libraries and re-run." + ) + raise if MAC_CROSS_COMPILE_INTEL: assert original_path