From: iyzsong@member.fsf.org (宋文武)
To: Danny Milosavljevic <dannym@scratchpost.org>
Cc: 28137@debbugs.gnu.org
Subject: [bug#28137] [PATCH] gnu: Add python-pyalsaaudio.
Date: Wed, 23 Aug 2017 21:22:16 +0800 [thread overview]
Message-ID: <87shgis9kn.fsf@member.fsf.org> (raw)
In-Reply-To: <20170818145128.13605-1-dannym@scratchpost.org> (Danny Milosavljevic's message of "Fri, 18 Aug 2017 16:51:28 +0200")
[-- Attachment #1: Type: text/plain, Size: 2083 bytes --]
Hello!
Danny Milosavljevic <dannym@scratchpost.org> 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:
[-- Attachment #2: 0001-gnu-Add-python-pyalsaaudio.patch --]
[-- Type: text/x-patch, Size: 1873 bytes --]
From f0e9259f84c7d1bd46ea6ac8b588c8daa6f654e4 Mon Sep 17 00:00:00 2001
From: Danny Milosavljevic <dannym@scratchpost.org>
Date: Fri, 18 Aug 2017 16:51:28 +0200
Subject: [PATCH] gnu: Add python-pyalsaaudio.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* gnu/packages/audio.scm (python-pyalsaaudio, python2-pyalsaaudio): New
variables.
Signed-off-by: 宋文武 <iyzsong@member.fsf.org>
---
gnu/packages/audio.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 40700cae3..5d88a5935 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -2906,3 +2906,29 @@ 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)) ; tests require access to ALSA devices.
+ (inputs
+ `(("alsa-lib" ,alsa-lib)))
+ (home-page "http://larsimmisch.github.io/pyalsaaudio/")
+ (synopsis "ALSA wrappers for Python")
+ (description
+ "This package contains wrappers for accessing the ALSA API from Python.
+It is currently fairly complete for PCM devices, and has some support for
+mixers.")
+ (license license:psfl)))
+
+(define-public python2-pyalsaaudio
+ (package-with-python2 python-pyalsaaudio))
--
2.13.3
next prev parent reply other threads:[~2017-08-23 13:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-18 14:51 [bug#28137] [PATCH] gnu: Add python-pyalsaaudio Danny Milosavljevic
2017-08-23 13:22 ` 宋文武 [this message]
2017-08-29 6:20 ` Danny Milosavljevic
2017-08-29 12:07 ` bug#28137: " 宋文武
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=87shgis9kn.fsf@member.fsf.org \
--to=iyzsong@member.fsf.org \
--cc=28137@debbugs.gnu.org \
--cc=dannym@scratchpost.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 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.