Skip to content

Commit

Permalink
cmake litgen_setup_module: better handling of site-package path under…
Browse files Browse the repository at this point in the history
… windows
  • Loading branch information
pthom committed Nov 21, 2024
1 parent 450c9bb commit 8c13722
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion _litgen_template
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,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; print(site.getsitepackages()[0])"
COMMAND "${Python_EXECUTABLE}" -c "import site, os; print([p.replace('\\\\', '/') for p in site.getsitepackages() if 'site-packages' in p][0])"
OUTPUT_VARIABLE python_site_packages
OUTPUT_STRIP_TRAILING_WHITESPACE COMMAND_ECHO STDOUT
RESULT_VARIABLE _result_python_site_packages
Expand Down

0 comments on commit 8c13722

Please sign in to comment.