Skip to content

Commit

Permalink
try fixing python pybind version
Browse files Browse the repository at this point in the history
Signed-off-by: Hugo KULESZA <hugo.kulesza@rte-france.com>
  • Loading branch information
HugoKulesza committed Dec 4, 2024
1 parent 43e0deb commit 9cd15d0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ endif()
if(BUILD_PYTHON_BINDINGS)
#Build pythin bindings
set(PYBIND11_FINDPYTHON ON)
set(PYBIND_PYTHON_VERSION ${PYTHON_VERSION})
find_package(pybind11 CONFIG REQUIRED)
add_subdirectory(pypowsybl-cpp)
endif()
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ def build_extension(self, ext):
if not extdir.endswith(os.path.sep):
extdir += os.path.sep
cmake_args = ['-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=' + extdir,
'-DPYTHON_EXECUTABLE=' + sys.executable]
'-DPYTHON_EXECUTABLE=' + sys.executable,
'-DPYTHON_VERSION=' + sys.version[:3]]

cfg = 'Debug' if self.debug else 'Release'
build_args = ['--config', cfg]
Expand Down

0 comments on commit 9cd15d0

Please sign in to comment.