Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgraded to pybind11 >2.6 #303

Merged
merged 1 commit into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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

Loading