From 689b0ed1c25c0115b8853aa6f6fdb0adf09408eb Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 22 Mar 2023 18:01:43 +0100 Subject: [PATCH] Fix macOS x86_64 clean deps build cmake errors with numpy We no longer need to get numpy from pip, the current numpy version no longer uses the buggy Accelerate framework by default. --- build_files/build_environment/CMakeLists.txt | 7 +------ .../build_environment/cmake/python_site_packages.cmake | 9 --------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/build_files/build_environment/CMakeLists.txt b/build_files/build_environment/CMakeLists.txt index f8a4d5d8c20..b77c64054ed 100644 --- a/build_files/build_environment/CMakeLists.txt +++ b/build_files/build_environment/CMakeLists.txt @@ -78,12 +78,7 @@ include(cmake/tbb.cmake) include(cmake/python.cmake) include(cmake/llvm.cmake) include(cmake/osl.cmake) -option(USE_PIP_NUMPY "Install NumPy using pip wheel instead of building from source" OFF) -if(APPLE AND ("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "x86_64")) - set(USE_PIP_NUMPY ON) -else() - include(cmake/numpy.cmake) -endif() +include(cmake/numpy.cmake) include(cmake/python_site_packages.cmake) include(cmake/package_python.cmake) include(cmake/openimageio.cmake) diff --git a/build_files/build_environment/cmake/python_site_packages.cmake b/build_files/build_environment/cmake/python_site_packages.cmake index 93bfd00a721..93fcd2076bf 100644 --- a/build_files/build_environment/cmake/python_site_packages.cmake +++ b/build_files/build_environment/cmake/python_site_packages.cmake @@ -38,15 +38,6 @@ ExternalProject_Add(external_python_site_packages --no-binary :all: ) -if(USE_PIP_NUMPY) - # Use only wheel (and not build from source) to stop NumPy from linking against buggy - # Accelerate framework backend on macOS. Official wheels are built with OpenBLAS. - ExternalProject_Add_Step(external_python_site_packages after_install - COMMAND ${PYTHON_BINARY} -m pip install --no-cache-dir numpy==${NUMPY_VERSION} --only-binary :all: - DEPENDEES install - ) -endif() - add_dependencies( external_python_site_packages external_python