[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#47181] Packaging python-soundfile for use in MediaGoblin
From: |
Ben Sturmfels |
Subject: |
[bug#47181] Packaging python-soundfile for use in MediaGoblin |
Date: |
Tue, 16 Mar 2021 22:47:42 +1100 |
User-agent: |
mu4e 1.4.15; emacs 27.1 |
Thanks Nicolò,
On Tue, 16 Mar 2021, Nicolò Balzarotti wrote:
>> OSError: cannot load library 'libsndfile.so.1': libsndfile.so.1:
>> cannot open shared object file: No such file or directory
>>
> You can patch the sounfile.py file, setting the correct library path.
>
> Many other python packages do this, like python-file, python-libarchive-c,
> python-pyzbar
>
> It should look something like (untested):
>
> #+begin_src scheme
> (arguments
> `(#:phases
> (modify-phases %standard-phases
> (add-before 'build 'set-library-file-name
> (lambda* (#:key inputs #:allow-other-keys)
> (let ((libsndfile (assoc-ref inputs "libsndfile")))
> (substitute* "soundfile.py"
> (("find_library\\('sndfile'\\)")
> (string-append "'" libsndfile "/lib/libsndfile.so.0'")))
> #t))))))
> #+end_src
Thanks, that solves my problem. One follow-up question - is it better to
use the ".so" link or the specific "so.0"?
I've now discovered a subsequent issue with libsndfile that I'll need to
put a patch in for first though. Progress!
Regards,
Ben