From a68219aca372427ce1d87bf573f9a79b6f13d79b Mon Sep 17 00:00:00 2001 From: Roy Kid Date: Fri, 15 Aug 2025 13:54:58 +0000 Subject: [PATCH 1/3] support pybind11 and xtensor 0.27 --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e6b9227..b0f98d3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,7 +32,7 @@ message(STATUS "xtensor-python v${${PROJECT_NAME}_VERSION}") # Dependencies # ============ -set(xtensor_REQUIRED_VERSION 0.26.0) +set(xtensor_REQUIRED_VERSION 0.27.0) if(TARGET xtensor) set(xtensor_VERSION ${XTENSOR_VERSION_MAJOR}.${XTENSOR_VERSION_MINOR}.${XTENSOR_VERSION_PATCH}) # Note: This is not SEMVER compatible comparison @@ -48,7 +48,7 @@ endif() find_package(Python COMPONENTS Interpreter REQUIRED) -set(pybind11_REQUIRED_VERSION 2.6.1) +set(pybind11_REQUIRED_VERSION 3.0.0) if (NOT TARGET pybind11::headers) # Defaults to ON for cmake >= 3.18 # https://github.com/pybind/pybind11/blob/35ff42b56e9d34d9a944266eb25f2c899dbdfed7/CMakeLists.txt#L96 From 026352175dacdd0a7f4f0ffbc71df19fb97d14ba Mon Sep 17 00:00:00 2001 From: Johan Mabille Date: Fri, 10 Oct 2025 10:14:29 +0200 Subject: [PATCH 2/3] Upgraded ot xtensor 0.27 and pybind11_3 --- environment-dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment-dev.yml b/environment-dev.yml index 876678b..4d3b27b 100644 --- a/environment-dev.yml +++ b/environment-dev.yml @@ -6,7 +6,7 @@ dependencies: - cmake - ninja # Host dependencies - - xtensor>=0.26,<0.27 + - xtensor>=0.27,<0.28 - numpy>=2.0 - pybind11>=2.12.0,<4 # Test dependencies From a8474595a1cde727e20a4e8b1edbb6b085da816b Mon Sep 17 00:00:00 2001 From: Johan Mabille Date: Fri, 10 Oct 2025 10:19:49 +0200 Subject: [PATCH 3/3] Requires C++20 in python tests --- test_python/setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test_python/setup.py b/test_python/setup.py index 58dbd2d..895f60d 100644 --- a/test_python/setup.py +++ b/test_python/setup.py @@ -78,8 +78,8 @@ def cpp_flag(compiler): """Return the -std=c++17 compiler flag and errors when the flag is no available. """ - if has_flag(compiler, '-std=c++17'): - return '-std=c++17' + if has_flag(compiler, '-std=c++20'): + return '-std=c++20' else: raise RuntimeError('C++17 support is required by xtensor!') @@ -104,7 +104,7 @@ def build_extensions(self): opts.append('-fvisibility=hidden') elif ct == 'msvc': opts.append('/DVERSION_INFO=\\"%s\\"' % self.distribution.get_version()) - opts.append('/std:c++17') + opts.append('/std:c++20') for ext in self.extensions: ext.extra_compile_args = opts build_ext.build_extensions(self)