Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add path to installed libraries to ffi.py #460

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dsanderson
Copy link

By default, libfive/bin/python/ffi.py searches for the libfive and libfive-stdlib libraries in the relative paths . and libfive; as a consequence, from libfive import stdlib fails if the script is not run in the build directory.

Cmake installs the libraries to ${CMAKE_INSTALL_PREFIX}/lib. I added that path to the paths variable in ffi.py, using the cmake configure_file function to replace the ${CMAKE_INSTALL_PREFIX} variable with the correct path. As a consequence, ffi.py is now copied into the build directory by cmake, rather than deferring to make. I don't know if that approach is acceptable here. Additionally, I've only been able to test this on linux (Ubuntu 20.04), so I put the changes to ffi.py behind a system check.

This change means, after running make install, the python bindings can be used from anywhere on the system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant