labath accepted this revision.
labath added a subscriber: ZeGentzy.
labath added a comment.
This revision is now accepted and ready to land.
This looks like a good idea to me, but given how fiddly this code seems to be,
lets give some time for @hhb and @ZeGentzy to try this out.
The logical next step seems to be to pass this information into
`prepare_binding_Python.py` to avoid recomputing the same thing twice. After
that, we could try to support the cross-compile scenario by detecting these
paths based on the target python (with the worst case being, making this a
cache variable and having the user override in a cross-scenario).
================
Comment at: lldb/scripts/CMakeLists.txt:45-50
+ execute_process(
+ COMMAND ${PYTHON_EXECUTABLE}
+ -c "import distutils.sysconfig, sys;
print(distutils.sysconfig.get_python_lib(True, False, sys.argv[1]))"
+ ${CMAKE_BINARY_DIR}
+ OUTPUT_VARIABLE SWIG_PYTHON_DIR
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
----------------
For my own education, is it possible that the result of the `get_python_lib`
call will fundamentally differ depending on the value of the third argument.
I.e., is there any case where `${SWIG_PYTHON_DIR}` will be different from
`${CMAKE_BINARY_DIR}/${SWIG_INSTALL_DIR}` ?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67890/new/
https://reviews.llvm.org/D67890
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits