go-python / gopy

gopy generates a CPython extension module from a go package.
BSD 3-Clause "New" or "Revised" License
2.05k stars 113 forks source link

main: Use RPATH=$ORIGIN linker flag with python extension #250

Closed justinfx closed 3 years ago

justinfx commented 3 years ago

This commit adds a linker flags to the python extension to set the RPATH=$ORIGIN. Doing so removes the need to set LD_LIBRARY_PATH in both the runtime environment, and in the tests environment, in order for the python extension to find the neighboring Go shared library.

Replaces #243

rcoreilly commented 3 years ago

I'm assuming you and @sbinet have all this under control -- I'll check everything out once the dust settles. Let me know if any specific input or testing is needed. Thanks for all the contributions! :)

justinfx commented 3 years ago

@rcoreilly Yes this has been going well so far. I've been applying all this work out of a need for my current integration goals in my project. Please do check out #249 and the PR I just submitted. I think if that look ok, it might end up cancelling this one.

I do have one more feature I am working on, beyond these.

sbinet commented 3 years ago

superseded by https://github.com/go-python/gopy/pull/251