From: jgart via Guix-patches via <guix-patches@gnu.org>
To: 49469@debbugs.gnu.org
Cc: jgart <jgart@dismail.de>
Subject: [bug#49469] [PATCH] gnu: Add python-pysox.
Date: Sun, 10 Oct 2021 02:15:04 -0400 [thread overview]
Message-ID: <20211010061525.11302-2-jgart@dismail.de> (raw)
In-Reply-To: <20211010061525.11302-1-jgart@dismail.de>
* gnu/packages/audio.scm (python-pysox): New variable.
---
gnu/packages/audio.scm | 57 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 57 insertions(+)
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index cc51ac51f3..8b412a63d1 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -2429,6 +2429,63 @@ compensation, (de)interleaving, and byte-swapping
;; original developer.
(license license:expat)))
+(define-public python-pysox
+ (let ((commit "3d0053381c24ae3490f759d4de87194b85789d36")
+ (revision "0"))
+ (package
+ (name "python-pysox")
+ (version (git-version "1.4.2" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/rabitt/pysox")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0i62jx92vfpcr2z7lp69yzqdi9idfs3pifl3rzm2akc2c4cr1mac"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-sox
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let* ((sox-store-path (assoc-ref inputs "sox"))
+ (sox-bin (string-append sox-store-path "/bin/sox")))
+ (substitute* "sox/__init__.py"
+ (("sox -h")
+ (string-append sox-bin " -h")))
+ (substitute* "sox/core.py"
+ (("\\['sox")
+ (string-append "['" sox-bin)))
+ (substitute* "sox/log.py"
+ (("Logger\\('sox")
+ (string-append "Logger\('" sox-bin))))))
+ (replace 'check
+ (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+ (when tests?
+ (add-installed-pythonpath inputs outputs)
+ (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
+ (invoke "pytest")))))))
+ (propagated-inputs
+ `(("python-numpy" ,python-numpy)
+ ("python-typing-extensions" ,python-typing-extensions)))
+ (native-inputs
+ `(("sox" ,sox)
+ ("python-pytest" ,python-pytest)
+ ("python-pytest-cov" ,python-pytest-cov)
+ ("python-soundfile" ,python-soundfile)))
+ (home-page "https://github.com/rabitt/pysox")
+ (synopsis "Python wrapper around sox")
+ (description
+"@code{pysox} is a wrapper around the @command{sox} command line tool.
+ pysox's API offers @code{Transformer} and @code{Combiner} classes that allow the user to
+incrementally build up effects and audio manipulations. @code{pysox} also
+provides methods for querying audio information such as sample rate,
+determining whether an audio file is silent and much more.")
+ (license license:bsd-3))))
+
(define-public python-pyaudio
(package
(name "python-pyaudio")
--
2.33.0
next prev parent reply other threads:[~2021-10-10 6:17 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-08 18:45 [bug#49469] [PATCH] gnu: Add python-pysox jgart via Guix-patches via
2021-07-08 19:35 ` jgart via Guix-patches via
2021-10-09 15:20 ` Arun Isaac
2021-10-10 6:15 ` [bug#49469] jgart via Guix-patches via
2021-10-10 6:15 ` jgart via Guix-patches via [this message]
2021-10-16 10:02 ` [bug#49469] [PATCH] gnu: Add python-pysox Arun Isaac
2021-10-16 10:05 ` Arun Isaac
2021-11-24 16:25 ` Arun Isaac
2021-11-25 4:33 ` jgart via Guix-patches via
2021-11-25 4:46 ` jgart via Guix-patches via
2021-11-29 16:12 ` bug#49469: " Arun Isaac
2021-11-25 4:42 ` [bug#49469] [PATCH v3] " jgart via Guix-patches via
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211010061525.11302-2-jgart@dismail.de \
--to=guix-patches@gnu.org \
--cc=49469@debbugs.gnu.org \
--cc=jgart@dismail.de \
/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 external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.