unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Leo Famulari <leo@famulari.name>
To: Martin Becze <mjbecze@riseup.net>
Cc: 44958@debbugs.gnu.org
Subject: [bug#44958] [PATCH 1/2] gnu: Add python-pytaglib.
Date: Mon, 30 Nov 2020 12:11:23 -0500	[thread overview]
Message-ID: <X8Unu0QrrNI2nG0f@jasmine.lan> (raw)
In-Reply-To: <20201130105047.8755-1-mjbecze@riseup.net>

On Mon, Nov 30, 2020 at 04:50:46AM -0600, Martin Becze wrote:
> * gnu/packages/mp3.scm (python-pytaglib): New variable.

Thanks! 

I applied your patch along with these changes, explained below:

------
diff --git a/gnu/packages/mp3.scm b/gnu/packages/mp3.scm
index 487117cc7d..e622f703d3 100644
--- a/gnu/packages/mp3.scm
+++ b/gnu/packages/mp3.scm
@@ -602,17 +602,31 @@ fingerprinting library and the Acoustid API.")
        (uri (pypi-uri "pytaglib" version))
        (sha256
         (base32
-         "0li970qslfymz4vk1wrij2nfqw3l15cpc3fjjci48mpvg17gbnhn"))))
+         "0li970qslfymz4vk1wrij2nfqw3l15cpc3fjjci48mpvg17gbnhn"))
+       ;; Delete file generated by Cython.
+       (modules '((guix build utils)))
+       (snippet
+        '(begin
+           (delete-file "src/taglib.cpp")))))
     (build-system python-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         ;; Ensure that the Cython file is regenerated.
+         (add-after 'unpack 'setup-environment
+           (lambda _
+             (setenv "PYTAGLIB_CYTHONIZE" "1"))))))
     (native-inputs
-     `(("taglib" ,taglib)
+     `(("python-cython" ,python-cython)
        ("python-pytest" ,python-pytest)))
+    (inputs
+     `(("taglib" ,taglib)))
     (home-page
      "https://github.com/supermihi/pytaglib")
     (synopsis
-     "Python binding for taglib")
+     "Python bindings for taglib")
     (description
      "This package is a Python audio tagging library.  It is
 cross-platform, works with all Python versions, and is very
-simple to use yet fully feature.")
+simple to use yet fully featured.")
     (license license:gpl3+)))
------

In general, we try not to use "pre-built" C and C++ files that are
created by Cython. They are not really considered "source code" because
they are not in the format preferred for editing.

I moved the taglib dependency from native-inputs to inputs, because it
is still referred to by the built pytaglib:

------
$ guix gc --references $(./pre-inst-env guix build --no-grafts python-pytaglib) | grep taglib-1.12
/gnu/store/b12szz8wy7wxvfv2jfj5ygqkgqar03ih-taglib-1.12-beta-1 
------

And I made some minor grammatical changes in the synopsis and
description. Thanks again!




  parent reply	other threads:[~2020-11-30 17:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-30 10:47 [bug#44958] [PATCH 0/2] Update Nicotine to 2.1.2 Martin Becze
2020-11-30 10:50 ` [bug#44958] [PATCH 1/2] gnu: Add python-pytaglib Martin Becze
2020-11-30 10:50   ` [bug#44958] [PATCH 2/2] gnu: nicotine: Update to 2.1.2 Martin Becze
2020-11-30 17:21     ` Leo Famulari
2020-11-30 17:11   ` Leo Famulari [this message]
2020-11-30 17:24   ` [bug#44958] [PATCH 1/2] gnu: Add python-pytaglib Leo Famulari
2020-11-30 17:29     ` Martin Becze
2020-11-30 17:35       ` Leo Famulari
2020-11-30 17:25 ` bug#44958: [PATCH 0/2] Update Nicotine to 2.1.2 Leo Famulari

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=X8Unu0QrrNI2nG0f@jasmine.lan \
    --to=leo@famulari.name \
    --cc=44958@debbugs.gnu.org \
    --cc=mjbecze@riseup.net \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).