From a9bafef6486042e2fad5a97ea52f317d2db33e9e Mon Sep 17 00:00:00 2001 From: Emanuel Gull Date: Fri, 9 May 2025 16:38:05 -0400 Subject: [PATCH 1/3] matching wrong if/else and introducing policy handling for CMP0135 --- applications/dmrg/tebd/CMakeLists.txt | 22 +++++++++++----------- config/FindBoostForALPS.cmake | 5 +++++ src/alps/CMakeLists.txt | 5 +++-- 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/applications/dmrg/tebd/CMakeLists.txt b/applications/dmrg/tebd/CMakeLists.txt index f69e70069..cffee7a5e 100644 --- a/applications/dmrg/tebd/CMakeLists.txt +++ b/applications/dmrg/tebd/CMakeLists.txt @@ -36,16 +36,16 @@ if(LAPACK_FOUND AND ALPS_BUILD_FORTRAN) endforeach(_hdf5_def) set_target_properties(tebd PROPERTIES COMPILE_DEFINITIONS "${ALPS_TEBD_DEFINITIONS}") endif(HDF5_DEFINITIONS) -if(ALPS_PYTHON_WHEEL) - install(TARGETS tebd RUNTIME DESTINATION pyalps/bin COMPONENT applications) - if(APPLE) - set_target_properties(tebd PROPERTIES INSTALL_RPATH "@loader_path/../lib" ) - else(APPLE) - set_target_properties(tebd PROPERTIES INSTALL_RPATH "$ORIGIN/../lib" ) - endif(APPLE) -else() - install(TARGETS tebd RUNTIME DESTINATION bin COMPONENT applications) -endif() + if(ALPS_PYTHON_WHEEL) + install(TARGETS tebd RUNTIME DESTINATION pyalps/bin COMPONENT applications) + if(APPLE) + set_target_properties(tebd PROPERTIES INSTALL_RPATH "@loader_path/../lib" ) + else(APPLE) + set_target_properties(tebd PROPERTIES INSTALL_RPATH "$ORIGIN/../lib" ) + endif(APPLE) + else() + install(TARGETS tebd RUNTIME DESTINATION bin COMPONENT applications) + endif() else(LAPACK_FOUND AND ALPS_BUILD_FORTRAN) message(STATUS "tebd will not be built") -endif(LAPACK_FOUND AND ALPS_BUILD_FORTRAN AND HDF5_STATIC_LIBRARIES) +endif(LAPACK_FOUND AND ALPS_BUILD_FORTRAN) diff --git a/config/FindBoostForALPS.cmake b/config/FindBoostForALPS.cmake index d44916b50..7c528aaf0 100644 --- a/config/FindBoostForALPS.cmake +++ b/config/FindBoostForALPS.cmake @@ -30,6 +30,11 @@ if (NOT Boost_SRC_DIR) include(FetchContent) + # Avoid warning about DOWNLOAD_EXTRACT_TIMESTAMP in CMake 3.24: + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0") + cmake_policy(SET CMP0135 NEW) + endif() + FetchContent_Declare( boost_src URL https://archives.boost.io/release/1.87.0/source/boost_1_87_0.tar.gz diff --git a/src/alps/CMakeLists.txt b/src/alps/CMakeLists.txt index d08ecc6bc..fe2bf7f6a 100644 --- a/src/alps/CMakeLists.txt +++ b/src/alps/CMakeLists.txt @@ -192,7 +192,8 @@ if(NOT WIN32 AND NOT APPLE AND NOT ALPS_PYTHON_WHEEL) PROPERTIES SOVERSION "${ALPS_VERSION_MAJOR}" VERSION "${ALPS_VERSION_MAJOR}.${ALPS_VERSION_MINOR}.${ALPS_VERSION_PATCH}" ) -endif(NOT WIN32 AND NOT APPLE) +endif(NOT WIN32 AND NOT APPLE AND NOT ALPS_PYTHON_WHEEL) + #boost librt linking if(NOT WIN32 AND NOT APPLE) @@ -255,4 +256,4 @@ else () ARCHIVE DESTINATION pyalps/lib LIBRARY DESTINATION pyalps/lib RUNTIME DESTINATION pyalps/bin) -endif() \ No newline at end of file +endif() From 5b1bf3749f09a4e2b7b824d30df7a08864aac4df Mon Sep 17 00:00:00 2001 From: Emanuel Gull Date: Fri, 9 May 2025 16:46:42 -0400 Subject: [PATCH 2/3] Update build.yml An attempt at fixing failing osx pip install --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a7a0b0f3e..81b560a15 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -72,7 +72,8 @@ jobs: - name: Install dependencies run: | brew install gcc python@${{ matrix.plat.py_version }} - python${{ matrix.plat.py_version }} -m pip install --upgrade pip --break-system-packages + # pip already exists, pip install fails + # python${{ matrix.plat.py_version }} -m pip install --upgrade pip --break-system-packages pip${{ matrix.plat.py_version }} install numpy==1.26.4 scipy==1.13.0 --break-system-packages brew install openmpi hdf5 wget https://archives.boost.io/release/1.${{ matrix.plat.boost_version }}.0/source/boost_1_${{ matrix.plat.boost_version }}_0.tar.gz From 023a84460c0690d43b73904cd617baaca10e43c5 Mon Sep 17 00:00:00 2001 From: Emanuel Gull Date: Sun, 11 May 2025 12:41:41 -0400 Subject: [PATCH 3/3] Update pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d85fec57b..89a40db3f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,7 +32,7 @@ authors = [ ] license = {text = "MIT License"} -dependencies = ["numpy<2.1", "scipy"] +dependencies = ["numpy", "scipy"] description = "Python Applications and Libraries for Physics Simulations" readme = "README-py.md"