Skip to content

Commit

Permalink
Merge pull request #303 from JohanMabille/pybind11
Browse files Browse the repository at this point in the history
Upgraded to pybind11 >2.6
  • Loading branch information
JohanMabille authored Jan 29, 2024
2 parents a0f1bb6 + 3df4fa5 commit c0915c3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
11 changes: 8 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,18 @@ else()
find_package(xtensor ${xtensor_REQUIRED_VERSION} REQUIRED)
message(STATUS "Found xtensor: ${xtensor_INCLUDE_DIRS}/xtensor")
endif()

# Currently no required version for pybind11

# Running find_package(PythonInterp) to retrieve the Python version
# which is not exported by Pybind11's cmake.
# Cf. https://github.com/pybind/pybind11/issues/2268
find_package(PythonInterp ${PythonLibsNew_FIND_VERSION} REQUIRED)

set(pybind11_REQUIRED_VERSION 2.6.1)
if(TARGET pybind11 OR TARGET pybind11::headers)
# pybind11 has a variable that indicates its version already, so use that
message(STATUS "Found pybind11 v${pybind11_VERSION}")
else()
find_package(pybind11 REQUIRED)
find_package(pybind11 ${pybind11_REQUIRED_VERSION} REQUIRED)
message(STATUS "Found pybind11: ${pybind11_INCLUDE_DIRS}/pybind11")
endif()

Expand Down
4 changes: 2 additions & 2 deletions environment-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ dependencies:
- cmake
- ninja
# Host dependencies
- xtensor=0.24.0
- xtensor>=0.24,<0.25
- numpy
- pybind11=2.4.3
- pybind11>=2.6.1,<3
# Test dependencies
- pytest

0 comments on commit c0915c3

Please sign in to comment.