mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-24 22:10:00 +00:00
build-all.py - provide with-openssl for python on Mac
This commit is contained in:
@@ -67,6 +67,7 @@ jobs:
|
|||||||
DARWIN_C_SOURCE=-D_DARWIN_C_SOURCE
|
DARWIN_C_SOURCE=-D_DARWIN_C_SOURCE
|
||||||
fi
|
fi
|
||||||
if [ "${{ matrix.arch }}" == "x64" ]; then
|
if [ "${{ matrix.arch }}" == "x64" ]; then
|
||||||
|
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||||
MAC_INTEL=-mac-cross-compile-intel
|
MAC_INTEL=-mac-cross-compile-intel
|
||||||
fi
|
fi
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|||||||
@@ -169,6 +169,7 @@ curl = "curl"
|
|||||||
wget = "wget"
|
wget = "wget"
|
||||||
strip = "strip"
|
strip = "strip"
|
||||||
xz = "xz" # Used implicitly for `tar -xf *.tar.xz`.
|
xz = "xz" # Used implicitly for `tar -xf *.tar.xz`.
|
||||||
|
brew_intel = "/usr/local/bin/brew"
|
||||||
|
|
||||||
explicit_targets = [s for s in sys.argv[1:] if not s.startswith("-")]
|
explicit_targets = [s for s in sys.argv[1:] if not s.startswith("-")]
|
||||||
"""Targets provided by CLI."""
|
"""Targets provided by CLI."""
|
||||||
@@ -355,6 +356,9 @@ for cmd in [git, bunzip2, tar, cc, cplusplus, autoconf, automake, make, "patch",
|
|||||||
if missing_commands:
|
if missing_commands:
|
||||||
raise ValueError(f"Required tools not installed or not added to PATH: {', '.join(missing_commands)}")
|
raise ValueError(f"Required tools not installed or not added to PATH: {', '.join(missing_commands)}")
|
||||||
|
|
||||||
|
if MAC_CROSS_COMPILE_INTEL:
|
||||||
|
assert os.path.exists(brew_intel), f"For intel cross compilation the brew path is expected to be '{brew_intel}'."
|
||||||
|
|
||||||
# identifiers for the download tool (could be less memory consuming as ints, but are more verbose as strings)
|
# identifiers for the download tool (could be less memory consuming as ints, but are more verbose as strings)
|
||||||
download_tool_default = download_tool_py = "py"
|
download_tool_default = download_tool_py = "py"
|
||||||
download_tool_git = "git"
|
download_tool_git = "git"
|
||||||
@@ -959,6 +963,8 @@ if "python" in targets and not USE_CURRENT_PYTHON_VERSION and "wasm" not in flag
|
|||||||
PYTHON_CONFIGURE_ARGS: "list[str]" = []
|
PYTHON_CONFIGURE_ARGS: "list[str]" = []
|
||||||
if platform.system() == "Darwin":
|
if platform.system() == "Darwin":
|
||||||
PYTHON_CONFIGURE_ARGS = ["--enable-shared"]
|
PYTHON_CONFIGURE_ARGS = ["--enable-shared"]
|
||||||
|
open_ssl_prefix = run([brew_intel, "--prefix", "openssl@3"]).strip()
|
||||||
|
PYTHON_CONFIGURE_ARGS.append(f'--with-openssl="{open_ssl_prefix}"')
|
||||||
|
|
||||||
for PYTHON_VERSION in PYTHON_VERSIONS:
|
for PYTHON_VERSION in PYTHON_VERSIONS:
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user