From 26f054eafaf80fb8b0eeb1fb843a5297a587b1c2 Mon Sep 17 00:00:00 2001 From: Serge Rabyking Date: Tue, 30 May 2023 21:02:07 +0100 Subject: [PATCH] CI build fix Updated cmake files to have find_package with Devlopment.Module to make build work both locally and from cibuildwheel. Added set Python_LIBRARIES="-Wl,--unresolved-symbols=ignore-all" in case when it is not set (in manylinux) as lipython not found. Added RPATH to be '$ORIGIN/libs:$ORIGIN' for all shared library be discoverable. --- CMakeLists.txt | 59 ++++++++------------- Seabreeze/CMakeLists.txt | 2 +- anabatic/CMakeLists.txt | 2 +- anabatic/src/CMakeLists.txt | 4 +- bootstrap/CMakeLists.txt | 2 +- bootstrap/cmake_modules/FindBootstrap.cmake | 4 +- bora/CMakeLists.txt | 2 +- crlcore/CMakeLists.txt | 2 +- crlcore/src/cyclop/CMakeLists.txt | 4 +- crlcore/src/pyCRL/CMakeLists.txt | 4 +- crlcore/src/x2y/CMakeLists.txt | 4 +- cumulus/CMakeLists.txt | 2 +- deprecated/katabatic/CMakeLists.txt | 2 +- deprecated/kite/CMakeLists.txt | 2 +- deprecated/mauka/CMakeLists.txt | 2 +- deprecated/metis/CMakeLists.txt | 2 +- deprecated/nimbus/CMakeLists.txt | 2 +- deprecated/vlsisapd/CMakeLists.txt | 2 +- etesian/CMakeLists.txt | 2 +- etesian/src/CMakeLists.txt | 4 +- flute/CMakeLists.txt | 2 +- flute/src/3.1/CMakeLists.txt | 4 +- foehn/CMakeLists.txt | 2 +- hurricane/CMakeLists.txt | 2 +- hurricane/src/isobar/CMakeLists.txt | 4 +- ispd/CMakeLists.txt | 2 +- karakaze/CMakeLists.txt | 2 +- katana/CMakeLists.txt | 2 +- katana/src/CMakeLists.txt | 4 +- oroshi/CMakeLists.txt | 2 +- pyproject.toml | 4 +- stratus1/CMakeLists.txt | 2 +- tutorial/CMakeLists.txt | 2 +- unicorn/CMakeLists.txt | 2 +- unittests/CMakeLists.txt | 2 +- 35 files changed, 67 insertions(+), 80 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d96f91e2..cb723124 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,24 +12,40 @@ set(CORIOLIS_TMP_INSTALL_DIR ${CMAKE_BINARY_DIR}/install) set(ENV{CORIOLIS_TOP} ${CORIOLIS_TMP_INSTALL_DIR}) function (build_coriolis_module target) + message("---------- Start building ${target} ----------") set(build_dir ${CMAKE_BINARY_DIR}/build_${target}) file(MAKE_DIRECTORY ${build_dir} ${build_dir}/build) file(WRITE ${build_dir}/CMakeLists.txt " -cmake_minimum_required(VERSION 3.16) +cmake_minimum_required(VERSION ${CMAKE_VERSION}) project(build_${target}) +find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module) + +if(NOT Python_LIBRARIES) + set(Python_LIBRARIES \"-Wl,--unresolved-symbols=ignore-all\") +endif() + +set(CXX_STANDARD \"-fPIC\") + +if(NOT Python3_LIBRARIES) + set(Python3_LIBRARIES \"\${Python_LIBRARIES}\") +endif() + list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_CURRENT_SOURCE_DIR}/bootstrap/cmake_modules) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/${target} ${build_dir}) ") - execute_process(COMMAND ${CMAKE_COMMAND} ${build_dir} - -D CMAKE_BUILD_TYPE=Release + execute_process( + COMMAND ${CMAKE_COMMAND} ${build_dir} + -D CMAKE_BUILD_TYPE:STRING=Release -D CMAKE_INSTALL_PREFIX:PATH=${CORIOLIS_TMP_INSTALL_DIR} - -D "PYTHON_INCLUDE_DIR=\$(python -c \"from distutils.sysconfig import get_python_inc\; print(get_python_inc())\")" - -D "PYTHON_LIBRARY=\$(python -c \"import distutils.sysconfig as sysconfig\; print(sysconfig.get_config_var('LIBDIR'))\")" - -D PYTHON_EXECUTABLE:FILEPATH=`which python` + -D CMAKE_BUILD_RPATH_USE_ORIGIN:BOOL=TRUE + -D CMAKE_SKIP_BUILD_RPATH:BOOL=FALSE + -D CMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=FALSE + -D CMAKE_INSTALL_RPATH:STRING='$ORIGIN/libs:$ORIGIN' + -D CMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=TRUE -G "${CMAKE_GENERATOR}" WORKING_DIRECTORY ${build_dir}/build RESULT_VARIABLE ${target}_setup_result @@ -95,35 +111,6 @@ endfunction() set(CORIOLIS_EXTRAS_DIR ${CMAKE_BINARY_DIR}/extras) file(MAKE_DIRECTORY ${CORIOLIS_EXTRAS_DIR}) -file(WRITE ${CORIOLIS_EXTRAS_DIR}/__init__.py -"import .libs -" -) -file(READ ${CORIOLIS_PACKAGE_SRCDIR}/__init__.py CORIOLIS_INIT_PY) -file(APPEND ${CORIOLIS_EXTRAS_DIR}/__init__.py "${CORIOLIS_INIT_PY}") - -file(WRITE ${CORIOLIS_EXTRAS_DIR}/libs/__init__.py -"import os, os.path, ctypes - -__libs=[] -def _preload_shared_libraries(dirname): - libs = [] - for name in os.listdir(dirname): - if name.endswith('.so'): - libs.append(os.path.join(dirname,name)) - nload = len(libs) - while nload > 0: - name=libs.pop(0) - try: - lib=ctypes.CDLL(name) - __libs.append(lib) - nload = len(libs) - except OSError: - libs.append(name) - nload -= 1 - -_preload_shared_libraries(os.path.dirname(os.path.realpath(__file__))) -" -) +# Put all extra python things into ${CORIOLIS_EXTRAS_DIR} directory coriolis_install_all(${CORIOLIS_PACKAGE_SRCDIR} ${CORIOLIS_EXTRAS_DIR}) diff --git a/Seabreeze/CMakeLists.txt b/Seabreeze/CMakeLists.txt index 4ac37b2f..82080557 100644 --- a/Seabreeze/CMakeLists.txt +++ b/Seabreeze/CMakeLists.txt @@ -20,7 +20,7 @@ setup_qt() find_package(Libexecinfo REQUIRED) - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module ) find_package(PythonSitePackages REQUIRED) find_package(LEFDEF REQUIRED) find_package(FLUTE REQUIRED) diff --git a/anabatic/CMakeLists.txt b/anabatic/CMakeLists.txt index dce068a6..9a752dc8 100644 --- a/anabatic/CMakeLists.txt +++ b/anabatic/CMakeLists.txt @@ -19,7 +19,7 @@ setup_boost() setup_qt() - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module ) find_package(PythonSitePackages REQUIRED) find_package(FLUTE REQUIRED) find_package(HURRICANE REQUIRED) diff --git a/anabatic/src/CMakeLists.txt b/anabatic/src/CMakeLists.txt index bd98aa1f..a145b8af 100644 --- a/anabatic/src/CMakeLists.txt +++ b/anabatic/src/CMakeLists.txt @@ -14,7 +14,7 @@ endif ( CHECK_DETERMINISM ) ${QtX_INCLUDE_DIRS} ${Python_INCLUDE_DIRS} ) - find_package (Python3 COMPONENTS Interpreter Development) + find_package (Python 3 COMPONENTS Interpreter Development.Module ) set( includes anabatic/Constants.h anabatic/Configuration.h anabatic/Matrix.h @@ -91,7 +91,7 @@ endif ( CHECK_DETERMINISM ) ${QtX_LIBRARIES} ${Boost_LIBRARIES} ${LIBXML2_LIBRARIES} - ${Python3_LIBRARIES} + ${Python_LIBRARIES} -lutil ) diff --git a/bootstrap/CMakeLists.txt b/bootstrap/CMakeLists.txt index 5ac1ba25..8fba48b9 100644 --- a/bootstrap/CMakeLists.txt +++ b/bootstrap/CMakeLists.txt @@ -12,7 +12,7 @@ list(INSERT CMAKE_MODULE_PATH 0 "${Bootstrap_SOURCE_DIR}/cmake_modules/") find_package(Bootstrap REQUIRED) # find_package(Python 3 REQUIRED COMPONENTS Interpreter Development ) - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development ) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module ) find_package(PythonSitePackages REQUIRED) print_cmake_module_path() diff --git a/bootstrap/cmake_modules/FindBootstrap.cmake b/bootstrap/cmake_modules/FindBootstrap.cmake index 89cc7b1d..6546449b 100644 --- a/bootstrap/cmake_modules/FindBootstrap.cmake +++ b/bootstrap/cmake_modules/FindBootstrap.cmake @@ -84,10 +84,10 @@ set(DEBUG_FLAGS "-g") if(CYGWIN) set(ADDITIONAL_FLAGS "-D_GLIBCXX_USE_C99") - set(CXX_STANDARD "gnu++11 -fPIC") + set(CXX_STANDARD "gnu++11 ${CXX_STANDARD}") else() set(ADDITIONAL_FLAGS "-Wl,--no-undefined") - set(CXX_STANDARD "c++11 -fPIC") + set(CXX_STANDARD "c++11 ${CXX_STANDARD}") endif() #set(CMAKE_C_FLAGS_DEBUG " -Wall -fsanitize=address ${ADDITIONAL_FLAGS} ${DEBUG_FLAGS}" CACHE STRING "C Compiler Debug options." FORCE) set(CMAKE_C_FLAGS_DEBUG " -Wall ${ADDITIONAL_FLAGS} ${DEBUG_FLAGS}" CACHE STRING "C Compiler Debug options." FORCE) diff --git a/bora/CMakeLists.txt b/bora/CMakeLists.txt index c0b0d7fc..e55b6d39 100644 --- a/bora/CMakeLists.txt +++ b/bora/CMakeLists.txt @@ -20,7 +20,7 @@ setup_qwt() find_package(Libexecinfo REQUIRED) - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module ) find_package(PythonSitePackages REQUIRED) find_package(LEFDEF REQUIRED) find_package(FLUTE REQUIRED) diff --git a/crlcore/CMakeLists.txt b/crlcore/CMakeLists.txt index 8a637c51..e010611c 100644 --- a/crlcore/CMakeLists.txt +++ b/crlcore/CMakeLists.txt @@ -28,7 +28,7 @@ find_package(Libbfd) endif() find_package(BZip2 REQUIRED) - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module ) find_package(PythonSitePackages REQUIRED) find_package(BISON REQUIRED) find_package(FLEX REQUIRED) diff --git a/crlcore/src/cyclop/CMakeLists.txt b/crlcore/src/cyclop/CMakeLists.txt index 438233a0..33926156 100644 --- a/crlcore/src/cyclop/CMakeLists.txt +++ b/crlcore/src/cyclop/CMakeLists.txt @@ -1,6 +1,6 @@ # -*- explicit-buffer-name: "CMakeLists.txt" -*- - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module ) include_directories ( ${CRLCORE_SOURCE_DIR}/src/ccore ${HURRICANE_INCLUDE_DIR} ${UTILITIES_INCLUDE_DIR} @@ -32,7 +32,7 @@ ${OA_LIBRARIES} ${QtX_LIBRARIES} ${Boost_LIBRARIES} - ${Python_LIBRARIES} + ${Python_LIBRARIES} -lutil ${LIBXML2_LIBRARIES} ${BZIP2_LIBRARIES} diff --git a/crlcore/src/pyCRL/CMakeLists.txt b/crlcore/src/pyCRL/CMakeLists.txt index 5103e903..e83c3c54 100644 --- a/crlcore/src/pyCRL/CMakeLists.txt +++ b/crlcore/src/pyCRL/CMakeLists.txt @@ -32,7 +32,7 @@ -lutil ) - find_package (Python3 COMPONENTS Interpreter Development) + find_package (Python 3 COMPONENTS Interpreter Development.Module ) add_definitions( -DCORIOLIS_TOP="${CORIOLIS_TOP}" -DSYS_CONF_DIR="${SYS_CONF_DIR}" @@ -98,7 +98,7 @@ ${HURRICANE_LIBRARIES} ${LEFDEF_LIBRARIES} ${QtX_LIBRARIES} - ${Python3_LIBRARIES} + ${Python_LIBRARIES} -lutil ) diff --git a/crlcore/src/x2y/CMakeLists.txt b/crlcore/src/x2y/CMakeLists.txt index 7a7538b2..c44913c3 100644 --- a/crlcore/src/x2y/CMakeLists.txt +++ b/crlcore/src/x2y/CMakeLists.txt @@ -1,7 +1,7 @@ # -*- explicit-buffer-name: "CMakeLists.txt -*- - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module ) include_directories ( ${CRLCORE_SOURCE_DIR}/src/ccore ${HURRICANE_INCLUDE_DIR} ${UTILITIES_INCLUDE_DIR} @@ -22,7 +22,7 @@ ${OA_LIBRARIES} ${QtX_LIBRARIES} ${Boost_LIBRARIES} - ${Python_LIBRARIES} + ${Python_LIBRARIES} -lutil ${LIBXML2_LIBRARIES} ${BZIP2_LIBRARIES} diff --git a/cumulus/CMakeLists.txt b/cumulus/CMakeLists.txt index 016becef..2c6f888e 100644 --- a/cumulus/CMakeLists.txt +++ b/cumulus/CMakeLists.txt @@ -15,7 +15,7 @@ set_cmake_policies() setup_sysconfdir("${CMAKE_INSTALL_PREFIX}") - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module ) find_package(PythonSitePackages REQUIRED) find_package(HURRICANE REQUIRED) find_package(CORIOLIS REQUIRED) diff --git a/deprecated/katabatic/CMakeLists.txt b/deprecated/katabatic/CMakeLists.txt index 2fbd6b9e..3051f0b5 100644 --- a/deprecated/katabatic/CMakeLists.txt +++ b/deprecated/katabatic/CMakeLists.txt @@ -19,7 +19,7 @@ setup_boost(program_options) setup_qt() - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module ) find_package(PythonSitePackages REQUIRED) find_package(FLUTE REQUIRED) find_package(HURRICANE REQUIRED) diff --git a/deprecated/kite/CMakeLists.txt b/deprecated/kite/CMakeLists.txt index 94fb97b2..9b20bdd2 100644 --- a/deprecated/kite/CMakeLists.txt +++ b/deprecated/kite/CMakeLists.txt @@ -19,7 +19,7 @@ setup_boost(program_options) setup_qt() - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module ) find_package(PythonSitePackages REQUIRED) find_package(FLUTE REQUIRED) find_package(LEFDEF REQUIRED) diff --git a/deprecated/mauka/CMakeLists.txt b/deprecated/mauka/CMakeLists.txt index c7678924..3e3db17f 100644 --- a/deprecated/mauka/CMakeLists.txt +++ b/deprecated/mauka/CMakeLists.txt @@ -15,7 +15,7 @@ setup_boost(program_options) setup_qt() - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module ) find_package(PythonSitePackages REQUIRED) find_package(HURRICANE REQUIRED) find_package(CORIOLIS REQUIRED) diff --git a/deprecated/metis/CMakeLists.txt b/deprecated/metis/CMakeLists.txt index af0f847f..5acb85c0 100644 --- a/deprecated/metis/CMakeLists.txt +++ b/deprecated/metis/CMakeLists.txt @@ -14,7 +14,7 @@ set_cmake_policies() setup_boost() - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module ) find_package(PythonSitePackages REQUIRED) find_package(HURRICANE REQUIRED) find_package(CORIOLIS REQUIRED) diff --git a/deprecated/nimbus/CMakeLists.txt b/deprecated/nimbus/CMakeLists.txt index 32619a78..96ae71fb 100644 --- a/deprecated/nimbus/CMakeLists.txt +++ b/deprecated/nimbus/CMakeLists.txt @@ -14,7 +14,7 @@ setup_boost(program_options) setup_qt() - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module ) find_package(PythonSitePackages REQUIRED) find_package(HURRICANE REQUIRED) find_package(CORIOLIS REQUIRED) diff --git a/deprecated/vlsisapd/CMakeLists.txt b/deprecated/vlsisapd/CMakeLists.txt index b7cfae82..20149bab 100644 --- a/deprecated/vlsisapd/CMakeLists.txt +++ b/deprecated/vlsisapd/CMakeLists.txt @@ -18,7 +18,7 @@ setup_boost(program_options python) find_package(LibXml2 REQUIRED) - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module ) find_package(PythonSitePackages REQUIRED) find_package(BISON REQUIRED) find_package(FLEX REQUIRED) diff --git a/etesian/CMakeLists.txt b/etesian/CMakeLists.txt index 35eeda18..ff37810a 100644 --- a/etesian/CMakeLists.txt +++ b/etesian/CMakeLists.txt @@ -18,7 +18,7 @@ set_cmake_policies() setup_boost(program_options) - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module ) find_package(PythonSitePackages REQUIRED) find_package(HURRICANE REQUIRED) #find_package(KATABATIC REQUIRED) diff --git a/etesian/src/CMakeLists.txt b/etesian/src/CMakeLists.txt index 149e64c0..ad70dda9 100644 --- a/etesian/src/CMakeLists.txt +++ b/etesian/src/CMakeLists.txt @@ -10,7 +10,7 @@ ${Boost_INCLUDE_DIRS} ${Python_INCLUDE_DIRS} ) - find_package (Python3 COMPONENTS Interpreter Development) + find_package (Python 3 COMPONENTS Interpreter Development.Module ) set( includes etesian/Configuration.h etesian/Placement.h etesian/FeedCells.h @@ -59,7 +59,7 @@ ${QtX_LIBRARIES} ${Boost_LIBRARIES} ${LIBXML2_LIBRARIES} - ${Python3_LIBRARIES} + ${Python_LIBRARIES} -lutil ${LIBEXECINFO_LIBRARIES} ) diff --git a/flute/CMakeLists.txt b/flute/CMakeLists.txt index b8f55141..cb5924b3 100644 --- a/flute/CMakeLists.txt +++ b/flute/CMakeLists.txt @@ -17,7 +17,7 @@ check_distribution() setup_sysconfdir( "${CMAKE_INSTALL_PREFIX}" ) - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module ) find_package(PythonSitePackages REQUIRED) find_package(HURRICANE REQUIRED) find_package(CORIOLIS REQUIRED) diff --git a/flute/src/3.1/CMakeLists.txt b/flute/src/3.1/CMakeLists.txt index d9ca1cfb..709737b2 100644 --- a/flute/src/3.1/CMakeLists.txt +++ b/flute/src/3.1/CMakeLists.txt @@ -6,7 +6,7 @@ ${CONFIGURATION_INCLUDE_DIR} ${Python_INCLUDE_DIRS} ) - find_package (Python3 COMPONENTS Interpreter Development) + find_package (Python 3 COMPONENTS Interpreter Development.Module ) set( includes flute.h dl.h @@ -34,7 +34,7 @@ ${HURRICANE_PYTHON_LIBRARIES} ${HURRICANE_LIBRARIES} ${UTILITIES_LIBRARY} - ${Python3_LIBRARIES} + ${Python_LIBRARIES} -lutil ) diff --git a/foehn/CMakeLists.txt b/foehn/CMakeLists.txt index 6bc7e2cc..11acbd7a 100644 --- a/foehn/CMakeLists.txt +++ b/foehn/CMakeLists.txt @@ -20,7 +20,7 @@ setup_qt() find_package(Libexecinfo REQUIRED) - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module ) find_package(PythonSitePackages REQUIRED) find_package(LEFDEF REQUIRED) find_package(FLUTE REQUIRED) diff --git a/hurricane/CMakeLists.txt b/hurricane/CMakeLists.txt index d398d482..ba5d0ded 100644 --- a/hurricane/CMakeLists.txt +++ b/hurricane/CMakeLists.txt @@ -24,7 +24,7 @@ find_package(BZip2 REQUIRED) find_package(BISON REQUIRED) find_package(FLEX REQUIRED) - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development ) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module ) find_package(PythonSitePackages REQUIRED) find_package(Libexecinfo REQUIRED) if (USE_LIBBFD) diff --git a/hurricane/src/isobar/CMakeLists.txt b/hurricane/src/isobar/CMakeLists.txt index 951f3701..928adc58 100644 --- a/hurricane/src/isobar/CMakeLists.txt +++ b/hurricane/src/isobar/CMakeLists.txt @@ -8,7 +8,7 @@ ${Boost_INCLUDE_DIRS} ${Python_INCLUDE_DIRS} ) - find_package (Python3 COMPONENTS Interpreter Development) + find_package (Python 3 COMPONENTS Interpreter Development.Module ) set( pyCpps ProxyProperty.cpp PythonAttributes.cpp PyBreakpoint.cpp @@ -168,7 +168,7 @@ ) set( depLibs hurricane - ${Python3_LIBRARIES} + ${Python_LIBRARIES} ${Boost_LIBRARIES} ) diff --git a/ispd/CMakeLists.txt b/ispd/CMakeLists.txt index 4ccc9c26..d3e76e69 100644 --- a/ispd/CMakeLists.txt +++ b/ispd/CMakeLists.txt @@ -17,7 +17,7 @@ set(QT_USE_QTXML "true") find_package(Qt4 REQUIRED) - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module ) find_package(PythonSitePackages REQUIRED) find_package(HURRICANE REQUIRED) find_package(CORIOLIS REQUIRED) diff --git a/karakaze/CMakeLists.txt b/karakaze/CMakeLists.txt index bbaa19d3..be5e1291 100644 --- a/karakaze/CMakeLists.txt +++ b/karakaze/CMakeLists.txt @@ -15,7 +15,7 @@ check_distribution() setup_sysconfdir("${CMAKE_INSTALL_PREFIX}") - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module ) find_package(PythonSitePackages REQUIRED) find_package(HURRICANE REQUIRED) find_package(CORIOLIS REQUIRED) diff --git a/katana/CMakeLists.txt b/katana/CMakeLists.txt index c196c67c..27f3e1e4 100644 --- a/katana/CMakeLists.txt +++ b/katana/CMakeLists.txt @@ -20,7 +20,7 @@ setup_qt() find_package(Libexecinfo REQUIRED) - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module ) find_package(PythonSitePackages REQUIRED) find_package(LEFDEF REQUIRED) find_package(FLUTE REQUIRED) diff --git a/katana/src/CMakeLists.txt b/katana/src/CMakeLists.txt index 88ab418a..fb6e7a54 100644 --- a/katana/src/CMakeLists.txt +++ b/katana/src/CMakeLists.txt @@ -12,7 +12,7 @@ ${Boost_INCLUDE_DIRS} ${Python_INCLUDE_DIRS} ) - find_package (Python3 COMPONENTS Interpreter Development) + find_package (Python 3 COMPONENTS Interpreter Development.Module ) set( includes katana/Constants.h katana/Block.h katana/TrackCost.h @@ -110,7 +110,7 @@ ${QtX_LIBRARIES} ${Boost_LIBRARIES} ${LIBXML2_LIBRARIES} - ${Python3_LIBRARIES} + ${Python_LIBRARIES} -lutil ${LIBEXECINFO_LIBRARIES} ) diff --git a/oroshi/CMakeLists.txt b/oroshi/CMakeLists.txt index d5f6890d..1f1357e8 100644 --- a/oroshi/CMakeLists.txt +++ b/oroshi/CMakeLists.txt @@ -18,7 +18,7 @@ if (USE_LIBBFD) find_package(Libbfd) endif() - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module ) find_package(PythonSitePackages REQUIRED) find_package(HURRICANE REQUIRED) find_package(CORIOLIS REQUIRED) diff --git a/pyproject.toml b/pyproject.toml index 3bd16205..21e917f3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,7 +50,7 @@ build-backend = "scikit_build_core.build" [tool.scikit-build] # The PEP 517 build hooks will add ninja and/or cmake if the versions on the # system are not at least these versions. Disabled by an empty string. -cmake.minimum-version = "3.15" +cmake.minimum-version = "3.16" ninja.minimum-version = "1.5" # Fallback on gmake/make if available and ninja is missing (Unix). Will only @@ -105,7 +105,7 @@ wheel.license-files = ["LICEN[CS]E*", "COPYING*", "NOTICE*", "AUTHORS*"] # This will backport an internal copy of FindPython if CMake is less than this # value. Set to 0 or the empty string to disable. The default will be kept in # sync with the version of FindPython stored in scikit-build-core. -backport.find-python = "3.26.1" +backport.find-python = "" # This is the only editable mode currently editable.mode = "redirect" diff --git a/stratus1/CMakeLists.txt b/stratus1/CMakeLists.txt index 4b10fcff..a3e73165 100644 --- a/stratus1/CMakeLists.txt +++ b/stratus1/CMakeLists.txt @@ -19,7 +19,7 @@ cmake_policy(SET CMP0002 OLD) setup_sysconfdir("${CMAKE_INSTALL_PREFIX}") - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module ) find_package(PythonSitePackages REQUIRED) find_package(HURRICANE REQUIRED) find_package(CORIOLIS REQUIRED) diff --git a/tutorial/CMakeLists.txt b/tutorial/CMakeLists.txt index 293de9a5..1272f4ad 100644 --- a/tutorial/CMakeLists.txt +++ b/tutorial/CMakeLists.txt @@ -19,7 +19,7 @@ setup_qt() find_package(Libexecinfo REQUIRED) - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module ) find_package(PythonSitePackages REQUIRED) find_package(LEFDEF REQUIRED) find_package(HURRICANE REQUIRED) diff --git a/unicorn/CMakeLists.txt b/unicorn/CMakeLists.txt index 8c407065..a7c79301 100644 --- a/unicorn/CMakeLists.txt +++ b/unicorn/CMakeLists.txt @@ -24,7 +24,7 @@ find_package(Libbfd) endif() find_package(BZip2 REQUIRED) - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module ) find_package(PythonSitePackages REQUIRED) find_package(LEFDEF REQUIRED) find_package(COLOQUINTE) diff --git a/unittests/CMakeLists.txt b/unittests/CMakeLists.txt index e3287790..2bacda2e 100644 --- a/unittests/CMakeLists.txt +++ b/unittests/CMakeLists.txt @@ -27,7 +27,7 @@ endif() find_package(Libexecinfo REQUIRED) find_package(BZip2 REQUIRED) - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module ) find_package(PythonSitePackages REQUIRED) find_package(LEFDEF) find_package(HURRICANE REQUIRED)