diff mbox series

[bug#48746,WIP,1/3] gnu: Add python-soundfile.

Message ID 20210530162012.24140-1-leo.prikler@student.tugraz.at
State Accepted
Headers show
Series Add python-audio-to-midi | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Leo Prikler May 30, 2021, 4:20 p.m. UTC
* gnu/packages/python-xyz.scm (python-soundfile): New variable.
---
 gnu/packages/python-xyz.scm | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 770beb0336..e190588efa 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -24120,6 +24120,40 @@  dependencies.  It implements the @uref{http://opensoundcontrol.org/spec-1_0,
 Open Sound Control 1.0} specification.")
     (license license:unlicense)))
 
+(define-public python-soundfile
+  (package
+    (name "python-soundfile")
+    (version "0.10.3.post1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "SoundFile" version))
+        (sha256
+          (base32
+            "0yqhrfz7xkvqrwdxdx2ydy4h467sk7z3gf984y1x2cq7cm1gy329"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-cffi" ,python-cffi)
+       ("python-numpy" ,python-numpy)
+       ("libsndfile" ,libsndfile)))
+    (native-inputs
+     `(("python-pytest" ,python-pytest)))
+    (arguments
+     `(#:tests? #f ; missing OGG support
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "soundfile.py"
+               (("_find_library\\('sndfile'\\)")
+                (string-append "\"" (assoc-ref inputs "libsndfile")
+                               "/lib/libsndfile.so\""))))))))
+    (home-page "https://github.com/bastibe/SoundFile")
+    (synopsis "Python bindings for libsndfile")
+    (description "This package provides python bindings for libsndfile based on
+CFFI and NumPy.")
+    (license license:expat)))
+
 (define-public python-voluptuous
   (package
     (name "python-voluptuous")