From e4c62bd902156c13b2b4b480cdd94d9ea1be8f75 Mon Sep 17 00:00:00 2001 From: Elq Hrkstn <105644136+hashelq@users.noreply.github.com> Date: Tue, 16 Apr 2024 20:46:33 +0000 Subject: [PATCH] python3Packages.wavefile: unbreak #288721 --- .../wavefile/libsndfile.py.patch | 36 +++++++++++-------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/pkgs/development/python-modules/wavefile/libsndfile.py.patch b/pkgs/development/python-modules/wavefile/libsndfile.py.patch index 6e10e6b6c03c..807221c48a3e 100644 --- a/pkgs/development/python-modules/wavefile/libsndfile.py.patch +++ b/pkgs/development/python-modules/wavefile/libsndfile.py.patch @@ -1,18 +1,26 @@ diff --git a/wavefile/libsndfile.py b/wavefile/libsndfile.py -index 67f0a46..ce066ee 100644 +index 89c670f..fa19e1d 100644 --- a/wavefile/libsndfile.py +++ b/wavefile/libsndfile.py -@@ -19,11 +19,11 @@ import numpy as np - if sys.platform == "win32": - dllName = 'libsndfile-1' - elif "linux" in sys.platform: -- dllName = 'libsndfile.so.1' -+ dllName = '@libsndfile@' - elif "cygwin" in sys.platform: - dllName = 'libsndfile-1.dll' - elif "darwin" in sys.platform: -- dllName = 'libsndfile.dylib' -+ dllName = '@libsndfile@' - else: - dllName = 'libsndfile' +@@ -17,20 +17,7 @@ import ctypes as ct + import numpy as np + def _libfilename(): +- for system, libname in [ +- ('win32', 'libsndfile-1'), +- ('cygwin', 'libsndfile-1.dll'), +- ('darwin', 'libsndfile.dylib'), +- ('linux', 'libsndfile.so.1'), +- ('freebsd', 'libsndfile.so.1'), +- ('', 'libsndfile'), +- ]: +- if system in sys.platform: +- return libname +- raise Exception( +- 'No libsndfile dll name mapping for platform {}.' +- .format(sys.platform) +- ) ++ return "@libsndfile@" + + dllName = _libfilename() + _lib=None