From 4c5388124211ca4164e8e4dd2897f87b342c5f78 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Mon, 22 Jul 2024 14:33:37 +0500 Subject: [PATCH] blenderbim makefile - safeguards for wheels used in the build --- src/blenderbim/Makefile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/blenderbim/Makefile b/src/blenderbim/Makefile index 1c0976a156..584466e9ba 100644 --- a/src/blenderbim/Makefile +++ b/src/blenderbim/Makefile @@ -297,6 +297,27 @@ ifeq ($(PLATFORM), macos) mv "$$prev_whl_name" "$$whl_name"; endif + # Safeguard for unhandled universal files. + @wheels=$$(find build/blenderbim/wheels/*universal2*.whl); \ + if [ -n "$$wheels" ]; then \ + echo "Found universal2 wheel files:"; \ + echo "$$wheels"; \ + echo "Error: universal2 wheel files are not supported by Blender!"; \ + exit 1; \ + fi + +ifneq ($(PLATFORM), linux) + # Safeguard: in case one of `pip download` will break, + # it will produce a linux wheel for non-linux build (our github action machine is using linux). + @wheels=$$(find build/blenderbim/wheels/*manylinux_*.whl); \ + if [ -n "$$wheels" ]; then \ + echo "Found linux wheel files in non-linux build:"; \ + echo "$$wheels"; \ + echo "Error: linux wheels are incompatible with build $(PLATFORM)!"; \ + exit 1; \ + fi +endif + $(PYTHON) scripts/get_wheels.py build/blenderbim/wheels build/blenderbim/blender_manifest.toml rm -rf build/blenderbim/bim/ rm -rf build/blenderbim/core/