GeezerVison is showing github.com — Merge pull request #303 from JohanMabille/pybind11 · xtensor-stack/xtensor-python@c0915c3
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: CMakeLists.txt +8-3Lines changed: 8 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -45,13 +45,18 @@ else() |
45 | 45 | find_package(xtensor ${xtensor_REQUIRED_VERSION} REQUIRED) |
46 | 46 | message(STATUS "Found xtensor: ${xtensor_INCLUDE_DIRS}/xtensor") |
47 | 47 | 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) |
50 | 55 | if(TARGET pybind11 OR TARGET pybind11::headers) |
51 | 56 | # pybind11 has a variable that indicates its version already, so use that |
52 | 57 | message(STATUS "Found pybind11 v${pybind11_VERSION}") |
53 | 58 | else() |
54 | | - find_package(pybind11 REQUIRED) |
| 59 | + find_package(pybind11 ${pybind11_REQUIRED_VERSION} REQUIRED) |
55 | 60 | message(STATUS "Found pybind11: ${pybind11_INCLUDE_DIRS}/pybind11") |
56 | 61 | endif() |
57 | 62 |
|
|
Collapse file
Copy file name to clipboardExpand all lines: environment-dev.yml +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -6,9 +6,9 @@ dependencies: |
6 | 6 | - cmake |
7 | 7 | - ninja |
8 | 8 | # Host dependencies |
9 | | - - xtensor=0.24.0 |
| 9 | + - xtensor>=0.24,<0.25 |
10 | 10 | - numpy |
11 | | - - pybind11=2.4.3 |
| 11 | + - pybind11>=2.6.1,<3 |
12 | 12 | # Test dependencies |
13 | 13 | - pytest |
14 | 14 |
|