8000 Merge pull request #303 from JohanMabille/pybind11 · xtensor-stack/xtensor-python@c0915c3 · GitHub
[go: up one dir, main page]

Skip to content

Commit c0915c3

Browse files
authored
Merge pull request #303 from JohanMabille/pybind11
Upgraded to pybind11 >2.6
2 parents a0f1bb6 + 3df4fa5 commit c0915c3

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

CMakeLists.txt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,18 @@ else()
4545
find_package(xtensor ${xtensor_REQUIRED_VERSION} REQUIRED)
4646
message(STATUS "Found xtensor: ${xtensor_INCLUDE_DIRS}/xtensor")
4747
endif()
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)
5055
if(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}")
5358
else()
54-
find_package(pybind11 REQUIRED)
59+
find_package(pybind11 ${pybind11_REQUIRED_VERSION} REQUIRED)
5560
message(STATUS "Found pybind11: ${pybind11_INCLUDE_DIRS}/pybind11")
5661
endif()
5762

environment-dev.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)
0