python-soundfile
python-soundfile copied to clipboard
Try explicit file name, and look system-wide for library
Try explicit file name, if the general does not work (e.g. on nixos) and if no local installed library sndfile, try system-wide
maybe additonal fix for #238, #258, #313,
Looks good to me. Is this ready to merge from your end?
GO, for it! :+1:
Sorry, @shithead, but another pull request recently changed the import behavior for M1 Macs, which broke your pull request.
I can amend your pull request for you if you'd like, but then it's my name in the commit history, not yours. If you'd like the attribution, you'll have to rebase your pull request onto the latest state.
Sorry for the inconvenience.
I try to solve it.
@panosl can look that this PR is possible solve your problem like in #311, too?
dlopen don't need an explicit path if LD_LIBRARY_PATH is right set. There is another solution possible with less complex code
import os as _os
_os.environ['LD_LIBRARY_PATH'] = ":".join([_os.path.join(_path,'_soundfile_data'),"/opt/homebrew/lib","/usr/local/lib",os.environ['LD_LIBRARY_PATH']])
set missing pathes to LD_LIBRARY_PATH environment.
If I remember correctly, LD_LIBRARY_PATH is meant to be customized by the user, not the application. For example, I could imagine a user setting a custom LD_LIBRARY_PATH to force an application to use a debugging library instead of a built-in one. So at the very least, we should append to the end of LD_LIBRARY_PATH in order to not break things, but it's probably prudent to leave it alone altogether.
Do you know of any resource on how to use LD_LIBRARY_PATH correctly, and whether it is permissible for us to modify it in the app?
You just added a commit that seems like it should solve the merge conflict, but it is still listed as conflicting on Github.
Sry, I am not familiar with Resolving confilicts by webui. I thinks, it's ready now.
This seems to change the original logic flow I think. Why did you code it this way?
https://github.com/bastibe/python-soundfile/pull/322#discussion_r778072645
Path specification is OS and programm specification not Machinearchitecture like arm64 or amd64. That's why I remove the machinearchitecture test.
Happy Eastern :egg: .
dlopendon't need an explicit path ifLD_LIBRARY_PATHis right set. There is another solution possible with less complex codeimport os as _os _os.environ['LD_LIBRARY_PATH'] = ":".join([_os.path.join(_path,'_soundfile_data'),"/opt/homebrew/lib","/usr/local/lib",os.environ['LD_LIBRARY_PATH']])set missing pathes to LD_LIBRARY_PATH environment.
My solution required _os.environ['DYLD_LIBRARY_PATH'].