@@ -49,16 +49,16 @@ def build_extension(self, ext):
4949 extdir = os .path .abspath (os .path .dirname (self .get_ext_fullpath (ext .name )))
5050 cmake_args = [
5151 '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=' + extdir ,
52- '-DPYTHON_EXECUTABLE=' + sys .executable ]
53-
54- # For MacOS .
55- # During compiling stage, the python module always links to a temporary generated library which is going to be destroyed.
56- # Then importing the final installed module will return a link error
57- # The following commands will force the module to look up the its dynmaic linked library in the same folder
58- # '-DCMAKE_INSTALL_RPATH=@loader_path ',
59- # '-DCMAKE_INSTALL_RPATH=$ORIGIN',
60- # '-DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON',
61- # '-DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=OFF'
52+ '-DPYTHON_EXECUTABLE=' + sys .executable ,
53+ # For MacOS.
54+ # During compiling stage, the python module always links to a temporary generated library which is going to be destroyed .
55+ # Then importing the final installed module will return a link error
56+ # The following commands will force the module to look up the its dynmaic linked library in the same folder
57+ '-DCMAKE_INSTALL_RPATH=@loader_path' ,
58+ '-DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON ' ,
59+ '-DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=OFF'
60+ ]
61+
6262
6363 cfg = 'Debug' if self .debug else 'Release'
6464 build_args = ['--config' , cfg ]
0 commit comments