Re: [PATCH 13/13] gnu: Add beets.

2016-03-28 Thread Ludovic Courtès
Alex Griffin  skribis:

> I tried building with --rounds=4 on my GuixSD machine, but it errored
> out after the first build with the same error. Then I tried building
> with --check on my Debian machine and it succeeded.

Maybe it’s a different derivation that --rounds complained about.

Notably, the ‘modules-compiled’ derivations are known not to be
bit-reproducible yet due to .

Ludo’.



Re: [PATCH 13/13] gnu: Add beets.

2016-03-27 Thread Leo Famulari
On Sun, Mar 27, 2016 at 05:36:19PM -0400, Leo Famulari wrote:
> On Sat, Mar 26, 2016 at 09:58:32AM -0500, Alex Griffin wrote:
> > I tried building with --rounds=4 on my GuixSD machine, but it errored
> > out after the first build with the same error. Then I tried building
> > with --check on my Debian machine and it succeeded.
> > 
> > Last night on IRC we were discussing this more and I think Leo was going
> > to try incorporating something from the nixos beets package, or else
> > wait until the beets developers could help him.
> 
> On IRC, (the user who I think is) Alex said that they were able to build
> beets with the attached patch.
> 
> All the patch does is invoke the tests with `nosetests -v` instead of
> `python setup.py test`, making use of python2-nose. This is what is done
> by Nixpkgs.
> 
> Is there anybody else who could not build beets before? Would you like
> to test the patch?

And now I see that the beets wiki says that the tests are to be run with
nose:
https://github.com/beetbox/beets/wiki/Testing

So, I applied the patch as 36c2c8c82.

> 
> > -- 
> > Alex Griffin
> > 
> > 
> > On Sat, Mar 26, 2016, at 06:41 AM, Ludovic Courtès wrote:
> > > Leo Famulari  skribis:
> > > 
> > > > Can you try building with '#:parallel-tests? #f', as shown in this link?
> > > 
> > > I was also going to suggest something along these lines.
> > > 
> > > Could you try building with with --rounds=4, say, on your machine?  (Or
> > > --check if it’s already there.)
> > > 
> > > Thanks,
> > > Ludo’.

> From ba2cb8403ab9340ab8a6da534e9db4cc3f2fbb84 Mon Sep 17 00:00:00 2001
> From: Leo Famulari 
> Date: Sat, 26 Mar 2016 17:53:59 -0400
> Subject: [PATCH] gnu: beets: Run tests with python-nose.
> 
> * gnu/packages/music.scm (nose)[native-inputs]: Add python-nose.
> [arguments]: Replace 'check' and use python-nose.
> ---
>  gnu/packages/music.scm | 5 -
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
> index 89f49c6..48d6214 100644
> --- a/gnu/packages/music.scm
> +++ b/gnu/packages/music.scm
> @@ -1274,13 +1274,16 @@ websites such as Libre.fm.")
> #:phases
> (modify-phases %standard-phases
>   (add-after 'unpack 'set-HOME
> -   (lambda _ (setenv "HOME" (string-append (getcwd) "/tmp")))
> +   (lambda _ (setenv "HOME" (string-append (getcwd) "/tmp"
> + (replace 'check
> +   (lambda _ (zero? (system* "nosetests" "-v")))
>  (native-inputs
>   `(("python2-beautifulsoup4" ,python2-beautifulsoup4)
> ("python2-flask" ,python2-flask)
> ("python2-setuptools" ,python2-setuptools)
> ("python2-mock" ,python2-mock)
> ("python2-mpd2" ,python2-mpd2)
> +   ("python2-nose" ,python2-nose)
> ("python2-pathlib" ,python2-pathlib)
> ("python2-pyxdg" ,python2-pyxdg)
> ("python2-pyechonest" ,python2-pyechonest)
> -- 
> 2.7.3
> 




Re: [PATCH 13/13] gnu: Add beets.

2016-03-27 Thread Leo Famulari
On Sat, Mar 26, 2016 at 09:58:32AM -0500, Alex Griffin wrote:
> I tried building with --rounds=4 on my GuixSD machine, but it errored
> out after the first build with the same error. Then I tried building
> with --check on my Debian machine and it succeeded.
> 
> Last night on IRC we were discussing this more and I think Leo was going
> to try incorporating something from the nixos beets package, or else
> wait until the beets developers could help him.

On IRC, (the user who I think is) Alex said that they were able to build
beets with the attached patch.

All the patch does is invoke the tests with `nosetests -v` instead of
`python setup.py test`, making use of python2-nose. This is what is done
by Nixpkgs.

Is there anybody else who could not build beets before? Would you like
to test the patch?

> -- 
> Alex Griffin
> 
> 
> On Sat, Mar 26, 2016, at 06:41 AM, Ludovic Courtès wrote:
> > Leo Famulari  skribis:
> > 
> > > Can you try building with '#:parallel-tests? #f', as shown in this link?
> > 
> > I was also going to suggest something along these lines.
> > 
> > Could you try building with with --rounds=4, say, on your machine?  (Or
> > --check if it’s already there.)
> > 
> > Thanks,
> > Ludo’.
>From ba2cb8403ab9340ab8a6da534e9db4cc3f2fbb84 Mon Sep 17 00:00:00 2001
From: Leo Famulari 
Date: Sat, 26 Mar 2016 17:53:59 -0400
Subject: [PATCH] gnu: beets: Run tests with python-nose.

* gnu/packages/music.scm (nose)[native-inputs]: Add python-nose.
[arguments]: Replace 'check' and use python-nose.
---
 gnu/packages/music.scm | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 89f49c6..48d6214 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -1274,13 +1274,16 @@ websites such as Libre.fm.")
#:phases
(modify-phases %standard-phases
  (add-after 'unpack 'set-HOME
-   (lambda _ (setenv "HOME" (string-append (getcwd) "/tmp")))
+   (lambda _ (setenv "HOME" (string-append (getcwd) "/tmp"
+ (replace 'check
+   (lambda _ (zero? (system* "nosetests" "-v")))
 (native-inputs
  `(("python2-beautifulsoup4" ,python2-beautifulsoup4)
("python2-flask" ,python2-flask)
("python2-setuptools" ,python2-setuptools)
("python2-mock" ,python2-mock)
("python2-mpd2" ,python2-mpd2)
+   ("python2-nose" ,python2-nose)
("python2-pathlib" ,python2-pathlib)
("python2-pyxdg" ,python2-pyxdg)
("python2-pyechonest" ,python2-pyechonest)
-- 
2.7.3



Re: [PATCH 13/13] gnu: Add beets.

2016-03-26 Thread Alex Griffin
I tried building with --rounds=4 on my GuixSD machine, but it errored
out after the first build with the same error. Then I tried building
with --check on my Debian machine and it succeeded.

Last night on IRC we were discussing this more and I think Leo was going
to try incorporating something from the nixos beets package, or else
wait until the beets developers could help him.
-- 
Alex Griffin


On Sat, Mar 26, 2016, at 06:41 AM, Ludovic Courtès wrote:
> Leo Famulari  skribis:
> 
> > Can you try building with '#:parallel-tests? #f', as shown in this link?
> 
> I was also going to suggest something along these lines.
> 
> Could you try building with with --rounds=4, say, on your machine?  (Or
> --check if it’s already there.)
> 
> Thanks,
> Ludo’.



Re: [PATCH 13/13] gnu: Add beets.

2016-03-25 Thread Leo Famulari
On Fri, Mar 25, 2016 at 06:37:28PM -0500, Alex Griffin wrote:
> This package builds fine on my Debian system but not on GuixSD. I've
> attached my build output, since it seems you're having trouble.

[...]

> ==
> FAIL: test_nonexistent_file (test_library.FilesizeTest)
> --
> Traceback (most recent call last):
>   File 
> "/tmp/guix-build-beets-1.3.17.drv-0/beets-1.3.17/test/test_library.py", line 
> 1116, in test_nonexistent_file
> self.assertEqual(item.filesize, 0)
> AssertionError: 987 != 0
> 
> --
> Ran 1646 tests in 119.423s
> 
> FAILED (failures=1, skipped=28)

I had only viewed the tails of the hydra logs, because that's where I
expected to find the error. Turns it was farther up!

So, you have the same error as hydra.

I just successfully built beets twice, on GuixSD in QEMU emulating x86-64.

Can you try building with '#:parallel-tests? #f', as shown in this link?

http://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/calcurse.scm#n28



Re: [PATCH 13/13] gnu: Add beets.

2016-03-25 Thread Leo Famulari
On Fri, Mar 25, 2016 at 12:04:53PM -0400, Mark H Weaver wrote:
> Leo Famulari  writes:
> 
> > On Thu, Mar 03, 2016 at 08:26:39PM -0500, Leo Famulari wrote:
> >> * gnu/packages/music.scm (beets): New variable.
> >
> > I did a final cleaning pass incorporating reviewers' suggestions,
> > satisfying the linter, and updating anything that had received an upstream
> > update since I started.
> >
> > Good thing, because I had forgotten that I'd packaged an old version of
> > python-responses with the intention of updating it later! [0] This involved
> > packaging python-cookies, as well.
> >
> > Pushed as 3bf429af2fd!
> 
> Hydra failed to build this.
> 
>   http://hydra.gnu.org/build/1090043
>   http://hydra.gnu.org/build/1098131
> 
> Can you take a look?

Weird :(

Since beets is basically an interactive database, my understanding is
that the test suite tests a large variety of database operations.

I'd built it on two x86_64 machines at least half a dozen times while
testing the package, without any failures like this.

I just rebuilt successfully on those machines, and also cross-built for
i686-linux. One of the machine's CPUs was fully loaded throughout
(although no real I/O contention), so I don't think that CPU load could
cause this failure.

Maybe there is some problem caused by I/O load or a lack of RAM? I can
try again if you can tell me how to simulate heavy I/O and low RAM
conditions.

Otherwise, I'm stumped. The build logs don't have any errors messages at
all; the messages just stop and hydra reports failure. I didn't
experience this locally.

Should we just try to rebuild it again on hydra?



Re: [PATCH 13/13] gnu: Add beets.

2016-03-19 Thread Ludovic Courtès
Leo Famulari  skribis:

> On Thu, Mar 03, 2016 at 08:26:39PM -0500, Leo Famulari wrote:
>> * gnu/packages/music.scm (beets): New variable.
>
> I did a final cleaning pass incorporating reviewers' suggestions,
> satisfying the linter, and updating anything that had received an upstream
> update since I started.
>
> Good thing, because I had forgotten that I'd packaged an old version of
> python-responses with the intention of updating it later! [0] This involved
> packaging python-cookies, as well.
>
> Pushed as 3bf429af2fd!

Cool, thanks for completing this!

Ludo’.



Re: [PATCH 13/13] gnu: Add beets.

2016-03-19 Thread Leo Famulari
On Thu, Mar 03, 2016 at 08:26:39PM -0500, Leo Famulari wrote:
> * gnu/packages/music.scm (beets): New variable.

I did a final cleaning pass incorporating reviewers' suggestions,
satisfying the linter, and updating anything that had received an upstream
update since I started.

Good thing, because I had forgotten that I'd packaged an old version of
python-responses with the intention of updating it later! [0] This involved
packaging python-cookies, as well.

Pushed as 3bf429af2fd!

[0] It built easily while the current version does not.



[PATCH 13/13] gnu: Add beets.

2016-03-03 Thread Leo Famulari
* gnu/packages/music.scm (beets): New variable.
---
 gnu/packages/music.scm | 48 
 1 file changed, 48 insertions(+)

diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 4959f3b..2369442 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -50,6 +50,7 @@
   #:use-module (gnu packages fltk)
   #:use-module (gnu packages fonts)
   #:use-module (gnu packages fontutils)
+  #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages gnupg)
   #:use-module (gnu packages gettext)
@@ -65,6 +66,7 @@
   #:use-module (gnu packages linux) ; for alsa-utils
   #:use-module (gnu packages man)
   #:use-module (gnu packages mp3)
+  #:use-module (gnu packages mpd)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages netpbm)
   #:use-module (gnu packages pdf)
@@ -1253,3 +1255,49 @@ websites such as Libre.fm.")
   (native-inputs
`(("python2-setuptools" ,python2-setuptools)
  ,@(package-native-inputs pylast))
+
+(define-public beets
+  (package
+(name "beets")
+(version "1.3.17")
+(source (origin
+  (method url-fetch)
+  (uri (pypi-uri name version))
+  (sha256
+   (base32
+"0yg7sp18sdpszkinhb0bi6yinbn316jy1baxrwiw0m4byrj3rr6c"
+(build-system python-build-system)
+(arguments
+ `(#:python ,python-2 ; only Python 2 is supported
+   #:phases
+   (modify-phases %standard-phases
+ (add-after 'unpack 'set-HOME
+   (lambda _ (setenv "HOME" (string-append (getcwd) "/tmp")))
+(native-inputs
+ `(("python2-beautifulsoup4" ,python2-beautifulsoup4)
+   ("python2-flask" ,python2-flask)
+   ("python2-setuptools" ,python2-setuptools)
+   ("python2-mock" ,python2-mock)
+   ("python2-mpd2" ,python2-mpd2)
+   ("python2-pathlib" ,python2-pathlib)
+   ("python2-pyxdg" ,python2-pyxdg)
+   ("python2-pyechonest" ,python2-pyechonest)
+   ("python2-pylast" ,python2-pylast)
+   ("python2-rarfile" ,python2-rarfile)
+   ("python2-responses" ,python2-responses)))
+;; TODO: Install optional plugins and dependencies.
+(propagated-inputs
+ `(("python2-enum34" ,python2-enum34)
+   ("python2-jellyfish" ,python2-jellyfish)
+   ("python2-munkres" ,python2-munkres)
+   ("python2-musicbrainzngs" ,python2-musicbrainzngs)
+   ("python2-mutagen" ,python2-mutagen)
+   ("python2-pyyaml" ,python2-pyyaml)
+   ("python2-unidecode" ,python2-unidecode)))
+(home-page "http://beets.io;)
+(synopsis "Music organizer")
+(description "The purpose of beets is to get your music collection right
+once and for all. It catalogs your collection, automatically improving its
+metadata as it goes using the MusicBrainz database. Then it provides a variety
+of tools for manipulating and accessing your music.")
+(license license:expat)))
-- 
2.6.3