[PATCH] gnu: Add python-simpleaudio.

  • Done
  • quality assurance status badge
Details
2 participants
  • Leo Famulari
  • Tanguy Le Carrour
Owner
unassigned
Submitted by
Tanguy Le Carrour
Severity
normal
T
T
Tanguy Le Carrour wrote on 28 Oct 2020 10:08
(address . guix-patches@gnu.org)(name . Tanguy Le Carrour)(address . tanguy@bioneland.org)
20201028090810.21543-1-tanguy@bioneland.org
* gnu/packages/python-xyz.scm (python-simpleaudio): New variable.
---
gnu/packages/python-xyz.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (37 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 6c5ccac647..a60e869db8 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -1843,6 +1843,30 @@ after Andy Lester’s Perl module WWW::Mechanize.")
(define-public python2-mechanize
(package-with-python2 python-mechanize))
+(define-public python-simpleaudio
+ (package
+ (name "python-simpleaudio")
+ (version "1.0.4")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "simpleaudio" version))
+ (sha256
+ (base32
+ "07glihg0fpca0gvbbvqs9q815w8xhflzdvg72yvlsm23j9j8h739"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:tests? #f))
+ (native-inputs
+ `(("alsa-lib" ,alsa-lib)))
+ (home-page
+ "https://github.com/hamiltron/py-simple-audio")
+ (synopsis "Simple, asynchronous audio playback for Python 3")
+ (description
+ "The @code{simplaudio} package provides cross-platform, dependency-free
+audio playback capability for Python 3 on OSX, Windows, and Linux.")
+ (license license:expat))) ; MIT license
+
(define-public python-simplejson
(package
(name "python-simplejson")
--
2.29.1
L
L
Leo Famulari wrote on 28 Oct 2020 17:32
(name . Tanguy Le Carrour)(address . tanguy@bioneland.org)(address . 44276@debbugs.gnu.org)
20201028163226.GD12095@jasmine.lan
On Wed, Oct 28, 2020 at 10:08:10AM +0100, Tanguy Le Carrour wrote:
Toggle quote (2 lines)
> * gnu/packages/python-xyz.scm (python-simpleaudio): New variable.

Thanks! Pushed as 36c74e27a830cef8c63973f6a35138209dfd26ae
L
L
Leo Famulari wrote on 28 Oct 2020 17:43
(name . Tanguy Le Carrour)(address . tanguy@bioneland.org)(address . 44276@debbugs.gnu.org)
20201028164357.GA13269@jasmine.lan
On Wed, Oct 28, 2020 at 10:08:10AM +0100, Tanguy Le Carrour wrote:
Toggle quote (5 lines)
> * gnu/packages/python-xyz.scm (python-simpleaudio): New variable.

> + (native-inputs
> + `(("alsa-lib" ,alsa-lib)))

After taking a closer look at the inputs in the pydub package, I noticed
that alsa-lib is a native-input; native-inputs are typically used only
while building the package.

The built package keeps a reference to alsa-lib:

------
$ guix gc --references $(./pre-inst-env guix build --no-grafts python-simpleaudio) | grep alsa-lib
/gnu/store/zcjdb23gbhl0pcnvvm8rnlprkfl43cv5-alsa-lib-1.2.2
$ grep -r alsa-lib $(./pre-inst-env guix build --no-grafts python-simpleaudio)
Binary file /gnu/store/kaiww0wf6a7kqzrn9la681lmwmp2k26w-python-simpleaudio-1.0.4/lib/python3.8/site-packages/simpleaudio/_simpleaudio.cpython-38-x86_64-linux-gnu.so matches
------

Either the reference is used and should not be the "native alsa-lib" (in
terms of cross-compiling), or it's not used and we can remove the
reference after building. I think the first option is more likely.
Should I change it from a 'native-input' to an 'input'?
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAl+Zn80ACgkQJkb6MLrK
fwh6MQ/8CM9IbpJkXgUojiTOWVFL7MaWCzSq8ZGDH8T2wL5S1YGGQ1uDSUedJ/Vu
wX+2LCnOmIBdtI87Id41eBQ9hAeXm96dkShiRglK+NOsTHUG4kkEBIDwlZXlohJ+
FWs3Cxgqf99TedqidUYVyLxwj09VzuPvtIq2uwLl2zXgBUAOYFvDbrQgDLiWPU60
tvDnJzVVW3QhrpNUDjfdoykn/1mh7lSfPDGEqWQVc/APuPCgXcyOp8uz7qfXtUoI
3f4Tw59nj5S7Emhx8PGX/++s/R/FAq3X16MWIPaXmeFAQ944aao/zwZxnkLNiwOC
aL9zH63nFO7QDusLtNOMNbLGuq613C1YIhc+k0jchHHLj+40g8kSixvH2HyU95qH
g2OJhlGhYvfEU8QO9RL/k3r5aY9qPFwXFC7iF/JMm1Ee+brlqsgz5jy4HEsxTH3Q
+5ObAlhmZD2zrrRRiuJ04W+H/BuUt32DXHbEbtfAFloInRfkT5dwxucsYttsYbJ3
0mQO+Kv203sScWT4c4eCe3r1uFXEAKTJ9nGc2r7Ph/CmbypdLWxNIlCKebr4t+mt
/WAR7C8whr0CKO3I0/3rAO9IP7sUOGI0xPt370vMqxoHnNjB+myFc3GHk+5TvX9P
sXnmS4OhcFZBKyWXNQLNoNKeiK8ib0GbNZdCt/t9eJmPd8Y7fTc=
=cY9F
-----END PGP SIGNATURE-----


T
T
Tanguy Le Carrour wrote on 29 Oct 2020 09:30
(name . Leo Famulari)(address . leo@famulari.name)(address . 44276@debbugs.gnu.org)
20201029083051.o7o6agdoqraoq2ya@rafflesia
Hi Leo,


Le 10/28, Leo Famulari a écrit :
Toggle quote (24 lines)
> On Wed, Oct 28, 2020 at 10:08:10AM +0100, Tanguy Le Carrour wrote:
> > * gnu/packages/python-xyz.scm (python-simpleaudio): New variable.
>
> > + (native-inputs
> > + `(("alsa-lib" ,alsa-lib)))
>
> After taking a closer look at the inputs in the pydub package, I noticed
> that alsa-lib is a native-input; native-inputs are typically used only
> while building the package.
>
> The built package keeps a reference to alsa-lib:
>
> ------
> $ guix gc --references $(./pre-inst-env guix build --no-grafts python-simpleaudio) | grep alsa-lib
> /gnu/store/zcjdb23gbhl0pcnvvm8rnlprkfl43cv5-alsa-lib-1.2.2
> $ grep -r alsa-lib $(./pre-inst-env guix build --no-grafts python-simpleaudio)
> Binary file /gnu/store/kaiww0wf6a7kqzrn9la681lmwmp2k26w-python-simpleaudio-1.0.4/lib/python3.8/site-packages/simpleaudio/_simpleaudio.cpython-38-x86_64-linux-gnu.so matches
> ------
>
> Either the reference is used and should not be the "native alsa-lib" (in
> terms of cross-compiling), or it's not used and we can remove the
> reference after building. I think the first option is more likely.
> Should I change it from a 'native-input' to an 'input'?

Way out of my comfort zone! ^_^'
Even if I think I get your point! `alsa-lib` is indeed used at run time.
So… do as you think is best! :-)

Thank again for your time and advice.

--
Tanguy
L
L
Leo Famulari wrote on 29 Oct 2020 15:14
(name . Tanguy Le Carrour)(address . tanguy@bioneland.org)(address . 44276-done@debbugs.gnu.org)
20201029141410.GA8956@jasmine.lan
On Thu, Oct 29, 2020 at 09:30:51AM +0100, Tanguy Le Carrour wrote:
Toggle quote (4 lines)
> Way out of my comfort zone! ^_^'
> Even if I think I get your point! `alsa-lib` is indeed used at run time.
> So… do as you think is best! :-)

Alright :) I made it a regular input with commit
bda1359b8e2ff36e10bce92475ce615211925342
Closed
T
T
Tanguy Le Carrour wrote on 29 Oct 2020 15:26
(name . Leo Famulari)(address . leo@famulari.name)(address . 44276-done@debbugs.gnu.org)
20201029142648.csfhzij5ppvbvz3h@rafflesia
Le 10/29, Leo Famulari a écrit :
Toggle quote (8 lines)
> On Thu, Oct 29, 2020 at 09:30:51AM +0100, Tanguy Le Carrour wrote:
> > Way out of my comfort zone! ^_^'
> > Even if I think I get your point! `alsa-lib` is indeed used at run time.
> > So… do as you think is best! :-)
>
> Alright :) I made it a regular input with commit
> bda1359b8e2ff36e10bce92475ce615211925342

Thanks!!

--
Tanguy
Closed
?