Skip to content

Commit

Permalink
cmake python: improve site-package detection (see #287)
Browse files Browse the repository at this point in the history
  • Loading branch information
pthom committed Dec 4, 2024
1 parent ccfb1d6 commit d34be42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion imgui_bundle_cmake/internal/litgen_setup_module.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ function(litgen_setup_module
# Also copy the python module to the site-packages folder (for non-editable mode)
# First, ask python for site-packages folder
execute_process(
COMMAND "${Python_EXECUTABLE}" -c "import site, os; print([p.replace('\\\\', '/') for p in site.getsitepackages() if 'site-packages' in p][0])"
COMMAND "${Python_EXECUTABLE}" -c "import sysconfig; print(sysconfig.get_path('platlib'))"
OUTPUT_VARIABLE python_site_packages
OUTPUT_STRIP_TRAILING_WHITESPACE COMMAND_ECHO STDOUT
RESULT_VARIABLE _result_python_site_packages
Expand Down

0 comments on commit d34be42

Please sign in to comment.