Skip to content

Commit 7788ae8

Browse files
committed
build-all.py: descriptive error for missing SSL support
1 parent 002b7c5 commit 7788ae8

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

nix/build-all.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,10 +1094,19 @@ def build_dependency(
10941094
f"http://www.python.org/ftp/python/{PYTHON_VERSION}/",
10951095
f"Python-{PYTHON_VERSION}.tgz",
10961096
)
1097-
python_bin = INSTALL_DIR / f"python-{PYTHON_VERSION}" / "bin" / "python3"
1097+
python_install = INSTALL_DIR / f"python-{PYTHON_VERSION}"
1098+
python_bin = python_install / "bin" / "python3"
10981099
# `_ssl` module is present -> we will be able to install `numpy` later
10991100
# to verify IfcOpenShell installation
1100-
run([str(python_bin), "-c", "import _ssl"])
1101+
try:
1102+
run([str(python_bin), "-c", "import _ssl"])
1103+
except RuntimeError:
1104+
print(
1105+
"ERROR: Python was built without SSL support (_ssl module is missing). "
1106+
f"To fix this: remove the installed Python at {python_install}; "
1107+
"install OpenSSL development libraries and re-run."
1108+
)
1109+
raise
11011110

11021111
if MAC_CROSS_COMPILE_INTEL:
11031112
assert original_path

0 commit comments

Comments
 (0)