File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -45,13 +45,18 @@ else()
4545 find_package (xtensor ${xtensor_REQUIRED_VERSION} REQUIRED)
4646 message (STATUS "Found xtensor: ${xtensor_INCLUDE_DIRS} /xtensor" )
4747endif ()
48-
49- # Currently no required version for pybind11
48+
49+ # Running find_package(PythonInterp) to retrieve the Python version
50+ # which is not exported by Pybind11's cmake.
51+ # Cf. https://github.com/pybind/pybind11/issues/2268
52+ find_package (PythonInterp ${PythonLibsNew_FIND_VERSION} REQUIRED)
53+
54+ set (pybind11_REQUIRED_VERSION 2.6.1)
5055if (TARGET pybind11 OR TARGET pybind11::headers)
5156 # pybind11 has a variable that indicates its version already, so use that
5257 message (STATUS "Found pybind11 v${pybind11_VERSION} " )
5358else ()
54- find_package (pybind11 REQUIRED)
59+ find_package (pybind11 ${pybind11_REQUIRED_VERSION} REQUIRED)
5560 message (STATUS "Found pybind11: ${pybind11_INCLUDE_DIRS} /pybind11" )
5661endif ()
5762
Original file line number Diff line number Diff line change @@ -6,9 +6,9 @@ dependencies:
66 - cmake
77 - ninja
88 # Host dependencies
9- - xtensor=0.24.0
9+ - xtensor> =0.24,<0.25
1010 - numpy
11- - pybind11=2.4. 3
11+ - pybind11> =2.6.1,< 3
1212 # Test dependencies
1313 - pytest
1414
You can’t perform that action at this time.
0 commit comments