From f1ab63dda954fe6bf782795b31ac77610f1da8e5 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Tue, 16 Jul 2024 12:04:28 +0500 Subject: [PATCH] pyradiance macos support + linux fix See: https://github.com/LBNL-ETA/pyradiance/issues/35 https://github.com/LBNL-ETA/pyradiance/issues/34 --- src/blenderbim/Makefile | 9 +++++---- src/blenderbim/blenderbim/bim/module/light/operator.py | 7 +------ 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/blenderbim/Makefile b/src/blenderbim/Makefile index b9acc8835e..7b37612ef3 100644 --- a/src/blenderbim/Makefile +++ b/src/blenderbim/Makefile @@ -214,11 +214,12 @@ endif cd dist/working && . env/bin/activate && $(PIP) install python-socketio[asyncio_client] --target=./site-packages cd dist/working && . env/bin/activate && $(PIP) install aiohttp --target=./site-packages # Required by light module +# pyradiance is using different platform versions than defaults in our makefile. ifeq ($(PLATFORM), linux) - # See https://github.com/LBNL-ETA/pyradiance/issues/34 - cd dist/working && . env/bin/activate && $(PIP) install pyradiance --platform manylinux1_x86_64 --python-version $(PYPI_VERSION) --implementation $(PYPI_IMP) --only-binary=:all: --target=./site-packages -else ifneq ($(PLATFORM), macos) - # No support for MacOS Intel from upstream. Too bad :( + cd dist/working && . env/bin/activate && $(PIP) install pyradiance --platform manylinux_2_35_x86_64 --python-version $(PYPI_VERSION) --implementation $(PYPI_IMP) --only-binary=:all: --target=./site-packages +else ifeq ($(PLATFORM), macos) + cd dist/working && . env/bin/activate && $(PIP) install pyradiance --platform macosx_10_13_x86_64 --python-version $(PYPI_VERSION) --implementation $(PYPI_IMP) --only-binary=:all: --target=./site-packages +else cd dist/working && . env/bin/activate && $(PIP) install pyradiance $(PYPI_PLATFORM) --python-version $(PYPI_VERSION) --implementation $(PYPI_IMP) --only-binary=:all: --target=./site-packages endif diff --git a/src/blenderbim/blenderbim/bim/module/light/operator.py b/src/blenderbim/blenderbim/bim/module/light/operator.py index d0acb51740..e46c7320c9 100644 --- a/src/blenderbim/blenderbim/bim/module/light/operator.py +++ b/src/blenderbim/blenderbim/bim/module/light/operator.py @@ -18,12 +18,7 @@ import os -try: - import pyradiance as pr -except ImportError: - print("PyRadiance is not available. Rendering functionality will be disabled.") - pr = None - +import pyradiance as pr import bpy from pathlib import Path