File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed
Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ function(finish_swig_python swig_target lldb_python_bindings_dir lldb_python_tar
6060 # Add a Post-Build Event to copy over Python files and create the symlink to
6161 # liblldb.so for the Python API(hardlink on Windows).
6262 add_custom_target (${swig_target} ALL VERBATIM
63- COMMAND ${CMAKE_COMMAND} -E make_directory ${lldb_python_target_dir}
63+ COMMAND ${CMAKE_COMMAND} -E make_directory ${lldb_python_target_dir} /native/
6464 DEPENDS ${lldb_python_bindings_dir} /lldb.py
6565 COMMENT "Python script sym-linking LLDB Python API" )
6666
@@ -74,6 +74,8 @@ function(finish_swig_python swig_target lldb_python_bindings_dir lldb_python_tar
7474 "${LLDB_SOURCE_DIR} /source/Interpreter/embedded_interpreter.py"
7575 "${lldb_python_target_dir} " )
7676
77+ create_python_package(${swig_target} ${lldb_python_target_dir} "native" FILES )
78+
7779 # Distribute the examples as python packages.
7880 create_python_package(
7981 ${swig_target}
@@ -141,7 +143,7 @@ function(finish_swig_python swig_target lldb_python_bindings_dir lldb_python_tar
141143 endif ()
142144 set (LIBLLDB_SYMLINK_OUTPUT_FILE "_lldb${LLDB_PYTHON_EXT_SUFFIX} " )
143145 create_relative_symlink(${swig_target} ${LIBLLDB_SYMLINK_DEST}
144- ${lldb_python_target_dir} ${LIBLLDB_SYMLINK_OUTPUT_FILE} )
146+ ${lldb_python_target_dir} /native/ ${LIBLLDB_SYMLINK_OUTPUT_FILE} )
145147
146148
147149 if (NOT WIN32 )
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ Older swig versions will simply ignore this setting.
5050 import $module
5151except ImportError:
5252 # Relative import should work if we are being loaded by Python.
53- from . import $module"
53+ from .native import $module"
5454%enddef
5555
5656// The name of the module to be created.
Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ add_lldb_library(liblldb SHARED ${option_framework}
145145 ${option_install_prefix}
146146)
147147
148- # lib/pythonX.Y/dist -packages/lldb/_lldb.so is a symlink to lib/liblldb.so,
148+ # lib/pythonX.Y/site -packages/lldb/_lldb.so is a symlink to lib/liblldb.so,
149149# which depends on lib/libLLVM*.so (BUILD_SHARED_LIBS) or lib/libLLVM-10git.so
150150# (LLVM_LINK_LLVM_DYLIB). Add an additional rpath $ORIGIN/../../../../lib so
151151# that _lldb.so can be loaded from Python.
You can’t perform that action at this time.
0 commit comments