Skip to content

Commit

Permalink
cmake: improve site-packages location detection
Browse files Browse the repository at this point in the history
  • Loading branch information
pthom committed Dec 4, 2024
1 parent 95f46f2 commit c78150a
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, 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 c78150a

Please sign in to comment.