[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#28137] [PATCH] gnu: Add python-pyalsaaudio.
From: |
宋文武 |
Subject: |
[bug#28137] [PATCH] gnu: Add python-pyalsaaudio. |
Date: |
Wed, 23 Aug 2017 21:22:16 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) |
Hello!
Danny Milosavljevic <address@hidden> writes:
> * gnu/packages/audio.scm (python-pyalsaaudio, python2-pyalsaaudio): New
> variables.
> ---
> gnu/packages/audio.scm | 44 ++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 44 insertions(+)
>
> diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
> index 40700cae3..5897e5f18 100644
> --- a/gnu/packages/audio.scm
> +++ b/gnu/packages/audio.scm
> @@ -2906,3 +2906,47 @@ code, used in @code{libtoxcore}.")
> 06.10 RPE-LTP lossy speech compression algorithm.")
> (home-page "http://quut.com/gsm/")
> (license (license:non-copyleft "file://COPYRIGHT"))))
> +
> +(define-public python-pyalsaaudio
> + (package
> + (name "python-pyalsaaudio")
> + (version "0.8.4")
> + (source
> + (origin
> + (method url-fetch)
> + (uri (pypi-uri "pyalsaaudio" version))
> + (sha256
> + (base32
> + "1180ypn9596rq4b7y7dyv627j1q0fqilmkkrckclnzsdakdgis44"))))
> + (build-system python-build-system)
> + (arguments
> + `(#:tests? #f ; FIXME
> + #:phases
> + (modify-phases %standard-phases
> + (add-before 'check 'setup-alsa
> + (lambda _
> + (mkdir-p "/tmp/foo")
> + (setenv "HOME" "/tmp/foo")
> + ;; TODO use snd-dummy kernel module.
> + (call-with-output-file "/tmp/foo/.asoundrc"
> + (lambda (port)
> + (format port "
> +pcm.!default {
> + type hw
> + card 0
> +}
> +ctl.!default {
> + type hw
> + card 0
> +}
> +")))
> + #t)))))
Do you managed to pass these tests with snd-dummy loaded? I think there
is no way to load kernel modules to the builder, how about simply leave
a comment?
> + (inputs
> + `(("alsa-lib" ,alsa-lib)))
> + (home-page "http://larsimmisch.github.io/pyalsaaudio/")
> + (synopsis "ALSA bindings for Python")
> + (description "@code{pyalsaaudio} provides ALSA bindings for
> Python.")
Its README.md file provides more description.
Here is my update for this patch:
0001-gnu-Add-python-pyalsaaudio.patch
Description: Text Data