From: Matthieu Simonin Date: Sat, 7 Nov 2020 21:23:25 +0000 (+0100) Subject: python: force pybind11 discovery (#353) X-Git-Tag: v3.26~202 X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/1fa7759213ebf07074bcdf0947117b1bc877881f python: force pybind11 discovery (#353) Fix #352 --- diff --git a/setup.py b/setup.py index d5475b4c79..6a7975c194 100755 --- a/setup.py +++ b/setup.py @@ -47,6 +47,7 @@ class CMakeBuild(build_ext): self.build_extension(ext) def build_extension(self, ext): + from pybind11 import get_cmake_dir extdir = os.path.abspath(os.path.dirname( self.get_ext_fullpath(ext.name))) cmake_args = ['-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=' + extdir, @@ -54,7 +55,9 @@ class CMakeBuild(build_ext): '-Denable_smpi=OFF', '-Denable_java=OFF', '-Denable_python=ON', - '-Dminimal-bindings=ON'] + '-Dminimal-bindings=ON', + '-Dpybind11_DIR=' + get_cmake_dir() + ] cfg = 'Debug' if self.debug else 'Release' build_args = ['--config', cfg]