unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Leo Prikler <leo.prikler@student.tugraz.at>
To: 48746@debbugs.gnu.org
Subject: [bug#48746] [PATCH v2 1/3] gnu: Add python-soundfile.
Date: Mon, 31 May 2021 15:35:28 +0200	[thread overview]
Message-ID: <20210531133530.22168-1-leo.prikler@student.tugraz.at> (raw)
In-Reply-To: <77c460fce68720ea8daf78b1647027f9b178e6ad.camel@student.tugraz.at>

* gnu/packages/audio.scm (python-soundfile): New variable.
---
 gnu/packages/audio.scm | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 5e30ed296d..7c469a81c4 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -84,6 +84,7 @@
   #:use-module (gnu packages icu4c)
   #:use-module (gnu packages image)
   #:use-module (gnu packages libbsd)
+  #:use-module (gnu packages libffi)
   #:use-module (gnu packages libusb)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages llvm)
@@ -2425,6 +2426,40 @@ included are the command line utilities @code{send_osc} and @code{dump_osc}.")
 (define-public python2-pyliblo
   (package-with-python2 python-pyliblo))
 
+(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 lilv
   (package
     (name "lilv")
-- 
2.31.1





  parent reply	other threads:[~2021-05-31 13:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-30 16:12 [bug#48746] [PATCH WIP 0/3] Add python-audio-to-midi Leo Prikler
2021-05-30 16:20 ` [bug#48746] [PATCH WIP 1/3] gnu: Add python-soundfile Leo Prikler
2021-05-30 16:20   ` [bug#48746] [PATCH WIP 2/3] gnu: Add python-python3-midi Leo Prikler
2021-05-30 16:20   ` [bug#48746] [PATCH WIP 3/3] gnu: Add python-audio-to-midi Leo Prikler
2021-05-31 13:35 ` Leo Prikler [this message]
2021-05-31 13:35   ` [bug#48746] [PATCH v2 2/3] gnu: Add python-python3-midi Leo Prikler
2021-05-31 13:35   ` [bug#48746] [PATCH v2 3/3] gnu: Add audio-to-midi Leo Prikler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210531133530.22168-1-leo.prikler@student.tugraz.at \
    --to=leo.prikler@student.tugraz.at \
    --cc=48746@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).