all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#27851] Update eyed3. ([PATCH 1/2] gnu: Add python-grako)
@ 2017-07-27 15:04 Thomas Danckaert
  2017-07-27 15:18 ` [bug#27851] Update eyed3. ([PATCH 2/2]) Thomas Danckaert
  2017-07-27 19:33 ` [bug#27851] Update eyed3. ([PATCH 1/2] gnu: Add python-grako) Leo Famulari
  0 siblings, 2 replies; 5+ messages in thread
From: Thomas Danckaert @ 2017-07-27 15:04 UTC (permalink / raw)
  To: 27851

[-- Attachment #1: Type: Text/Plain, Size: 479 bytes --]

Hi Guix,

I'm sending two patches to update eyed3 to version 0.8 (and switch it 
over to python3).  This patch adds grako, a new requirement for eyed3 
0.8.

Question: do we need a python2 variant for every python package?  At 
the moment, eyed3 is the only package using grako, and I've switched 
eyed3 to python3.  I think it's OK to leave out the python2 versio of 
grako then (we can always add it if a future package needs it)?  For 
now I included it in the patch.

Thomas

[-- Attachment #2: 0001-gnu-Add-python-grako.patch --]
[-- Type: Text/X-Patch, Size: 1647 bytes --]

From 1916f4d665b55be7e1ed9dad087dc9a24f8cdace Mon Sep 17 00:00:00 2001
From: Thomas Danckaert <thomas.danckaert@gmail.com>
Date: Thu, 27 Jul 2017 16:45:19 +0200
Subject: [PATCH 1/2] gnu: Add python-grako

* gnu/packages/python.scm (python-grako): New variable.
---
 gnu/packages/python.scm | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index d110a1cb3..466ff705a 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -4983,6 +4983,34 @@ Python language binding specification.")
 (define-public python2-drmaa
   (package-with-python2 python-drmaa))
 
+(define-public python-grako
+  (package
+    (name "python-grako")
+    (version "3.99.9")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (pypi-uri "grako" version ".zip"))
+       (sha256
+        (base32
+         "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
+    (build-system python-build-system)
+    (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
+    (native-inputs
+     `(("unzip" ,unzip)
+       ("python-pytest" ,python-pytest-3.0)
+       ("python-pytest-runner" ,python-pytest-runner)))
+    (home-page "https://bitbucket.org/neogeny/grako")
+    (synopsis "EBNF parser generator")
+    (description
+     "Grako takes a grammar in a variation of EBNF as input, and outputs a
+memoizing PEG/Packrat parser in Python.")
+    (license license:bsd-3)))
+
+(define-public python2-grako
+  (package-with-python2 python-grako))
+
 (define-public python-gridmap
   (package
     (name "python-gridmap")
-- 
2.13.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#27851] Update eyed3. ([PATCH 2/2])
  2017-07-27 15:04 [bug#27851] Update eyed3. ([PATCH 1/2] gnu: Add python-grako) Thomas Danckaert
@ 2017-07-27 15:18 ` Thomas Danckaert
  2017-07-27 19:35   ` Leo Famulari
  2017-07-27 19:33 ` [bug#27851] Update eyed3. ([PATCH 1/2] gnu: Add python-grako) Leo Famulari
  1 sibling, 1 reply; 5+ messages in thread
From: Thomas Danckaert @ 2017-07-27 15:18 UTC (permalink / raw)
  To: 27851

[-- Attachment #1: Type: text/plain, Size: 501 bytes --]

Another patch, another question: eyed3's test suite uses an archive of
mp3 files, at least some of which were not produced by the program
authors (there's even a Cypress Hill cover art file in the archive :-)).
I added the archive as a native input, but have no idea if this is OK.
Can such a native input also end up as a cached substitute on hydra?  In
that case, I think Guix would infringe on the copyright of the artists,
and we'd better just disable the tests.

Your thoughts?

thanks!

Thomas


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0002-gnu-eyed3-Update-to-0.8-build-with-python3.patch --]
[-- Type: text/x-patch, Size: 2758 bytes --]

From 6f207141fbe9af153a930227233756fe34497897 Mon Sep 17 00:00:00 2001
From: Thomas Danckaert <thomas.danckaert@gmail.com>
Date: Thu, 27 Jul 2017 16:47:53 +0200
Subject: [PATCH 2/2] gnu: eyed3: Update to 0.8, build with python3.

* gnu/packages/mp3.scm (eyed3): [source] Update to 0.8.
[arguments]: No longer build with python-2.  Add phase 'unpack-testdata'.
[propagated-inputs]: Add python-six and python-grako.
[native-inputs]: Don't use python2 variants; remove python2-sphinx and
python2-coverage; add python-factory-boy, python-pytest and testdata.
---
 gnu/packages/mp3.scm | 33 +++++++++++++++++++++++++++------
 1 file changed, 27 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/mp3.scm b/gnu/packages/mp3.scm
index 8a3a5809c..36351280c 100644
--- a/gnu/packages/mp3.scm
+++ b/gnu/packages/mp3.scm
@@ -459,7 +459,7 @@ compression format (.mpc files).")
 (define-public eyed3
   (package
     (name "eyed3")
-    (version "0.7.10")
+    (version "0.8")
     (source (origin
              (method url-fetch)
              (uri (string-append
@@ -467,14 +467,35 @@ compression format (.mpc files).")
                   version ".tar.gz"))
              (sha256
               (base32
-               "0wjicszs64ksj2y5jbk09yjd08znc1qnarlq8ssmx13f2d4x59wq"))))
+               "1dcswb0f6w3b05s1v43pq8fmavkd5g88ysndn9160wlaa1v9n40h"))))
     (build-system python-build-system)
     (arguments
-     `(#:python ,python-2))
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'unpack-testdata
+           (lambda* (#:key inputs #:allow-other-keys)
+             (system* "tar" "-xzf"
+                      (assoc-ref inputs "eyed3-testdata")
+                      "--transform" "s/eyeD3-test-data/data/"
+                      "-C" "src/test")
+             #t))
+         (replace 'check
+           (lambda _
+             (zero? (system* "make" "test")))))))
+    (propagated-inputs
+     `(("python-six" ,python-six)
+       ("python-grako" ,python-grako)))
     (native-inputs
-     `(("python2-nose" ,python2-nose)
-       ("python2-sphinx" ,python2-sphinx)
-       ("python2-coverage" ,python2-coverage)))
+     `(("eyed3-testdata"
+        ,(origin
+           (method url-fetch)
+           (uri "http://nicfit.net/files/eyeD3-test-data.tgz")
+           (sha256
+            (base32
+             "1qpwwa343i6zc7j1dadpx395bmfvcn7vr56ncijrn8a72w71kzlb"))))
+       ("python-nose" ,python-nose)
+       ("python-factory-boy" ,python-factory-boy)
+       ("python-pytest" ,python-pytest-3.0)))
     (synopsis "MP3 tag ID3 metadata editor")
     (description "eyeD3 is a Python tool for working with audio files,
 specifically mp3 files containing ID3 metadata (i.e. song info).  It provides a
-- 
2.13.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#27851] Update eyed3. ([PATCH 1/2] gnu: Add python-grako)
  2017-07-27 15:04 [bug#27851] Update eyed3. ([PATCH 1/2] gnu: Add python-grako) Thomas Danckaert
  2017-07-27 15:18 ` [bug#27851] Update eyed3. ([PATCH 2/2]) Thomas Danckaert
@ 2017-07-27 19:33 ` Leo Famulari
  2017-08-02 12:33   ` bug#27851: " Thomas Danckaert
  1 sibling, 1 reply; 5+ messages in thread
From: Leo Famulari @ 2017-07-27 19:33 UTC (permalink / raw)
  To: Thomas Danckaert; +Cc: 27851

[-- Attachment #1: Type: text/plain, Size: 748 bytes --]

On Thu, Jul 27, 2017 at 05:04:46PM +0200, Thomas Danckaert wrote:
> Hi Guix,
> 
> I'm sending two patches to update eyed3 to version 0.8 (and switch it over
> to python3).  This patch adds grako, a new requirement for eyed3 0.8.

Cool, thanks!

> Question: do we need a python2 variant for every python package?  At the
> moment, eyed3 is the only package using grako, and I've switched eyed3 to
> python3.  I think it's OK to leave out the python2 versio of grako then (we
> can always add it if a future package needs it)?  For now I included it in
> the patch.

For library or module code, I think we should add both variants if they
both build. They tend to be very cheap to build so there's not a big
downside, in my opinion.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [bug#27851] Update eyed3. ([PATCH 2/2])
  2017-07-27 15:18 ` [bug#27851] Update eyed3. ([PATCH 2/2]) Thomas Danckaert
@ 2017-07-27 19:35   ` Leo Famulari
  0 siblings, 0 replies; 5+ messages in thread
From: Leo Famulari @ 2017-07-27 19:35 UTC (permalink / raw)
  To: Thomas Danckaert; +Cc: 27851

[-- Attachment #1: Type: text/plain, Size: 815 bytes --]

On Thu, Jul 27, 2017 at 05:18:58PM +0200, Thomas Danckaert wrote:
> Another patch, another question: eyed3's test suite uses an archive of
> mp3 files, at least some of which were not produced by the program
> authors (there's even a Cypress Hill cover art file in the archive :-)).
> I added the archive as a native input, but have no idea if this is OK.
> Can such a native input also end up as a cached substitute on hydra?  In
> that case, I think Guix would infringe on the copyright of the artists,
> and we'd better just disable the tests.
> 
> Your thoughts?

I've been using eyeD3 and it seems to work fine even though we haven't
been testing it. I'd omit the test phase and test-files package, but
leave a comment explaining the situation for whoever might want to debug
our package later.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#27851: Update eyed3. ([PATCH 1/2] gnu: Add python-grako)
  2017-07-27 19:33 ` [bug#27851] Update eyed3. ([PATCH 1/2] gnu: Add python-grako) Leo Famulari
@ 2017-08-02 12:33   ` Thomas Danckaert
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Danckaert @ 2017-08-02 12:33 UTC (permalink / raw)
  To: leo, 27851-close

Hi Leo,

I pushed both patches (removing eyeD3 tests as discussed), closing.

Thank you for your comments!

Thomas

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-08-02 12:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-27 15:04 [bug#27851] Update eyed3. ([PATCH 1/2] gnu: Add python-grako) Thomas Danckaert
2017-07-27 15:18 ` [bug#27851] Update eyed3. ([PATCH 2/2]) Thomas Danckaert
2017-07-27 19:35   ` Leo Famulari
2017-07-27 19:33 ` [bug#27851] Update eyed3. ([PATCH 1/2] gnu: Add python-grako) Leo Famulari
2017-08-02 12:33   ` bug#27851: " Thomas Danckaert

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.