diff --git a/.github/workflows/build_osx.yml b/.github/workflows/build_osx.yml index 1697812128..251710ec49 100644 --- a/.github/workflows/build_osx.yml +++ b/.github/workflows/build_osx.yml @@ -83,8 +83,14 @@ jobs: fi set -o pipefail export QT_DIR="$(brew --prefix qt)" + # IFCOS_BUILD_PYTHON_WRAPPER=off skips IfcOpenShell-Python on + # macOS until the plug-in refactor's CREATE_BUNDLE install rule + # actually drops ifcopenshell.document.rdb.dylib into + # site-packages/ifcopenshell/ (see the commit that added this + # gate for the full history + the rocksdb/macdeployqt write-up). CXXFLAGS="-O3" CFLAGS="-O3 ${DARWIN_C_SOURCE}" ADD_COMMIT_SHA=1 BUILD_CFG=Release \ BUILD_BONSAIVIEWER=ON QT_DIR="${QT_DIR}" \ + IFCOS_BUILD_PYTHON_WRAPPER=off \ python3 ./nix/build-all.py -v --diskcleanup ${MAC_INTEL} \ | tee build.log diff --git a/nix/build-all.py b/nix/build-all.py index e2e2e1c27d..951cfe0edc 100644 --- a/nix/build-all.py +++ b/nix/build-all.py @@ -409,6 +409,14 @@ if not explicit_targets and not BUILD_BONSAIVIEWER: targets.difference_update({"BonsaiViewer", "qt6"}) if BUILD_BONSAIVIEWER: targets.update(gather_dependencies("BonsaiViewer")) + +# Opt-out for the Python wrapper. Currently used by the bonsai CI workflow +# on macOS, where the post-plug-in-refactor wrapper hard-links +# ifcopenshell.document.rdb.dylib but the CREATE_BUNDLE install rule does +# not actually drop the dylib next to the wrapper in site-packages — see +# the commit message that introduced this gate. +if os.environ.get("IFCOS_BUILD_PYTHON_WRAPPER", "on").lower() in {"0", "off", "false", "no"}: + targets.discard("IfcOpenShell-Python") if WASM: SKIP_TARGETS_FOR_WASM = { "rocksdb",