From: Alex Kost <alezost@gmail.com>
To: Troy Sankey <sankeytms@gmail.com>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] update notmuch and python bindings
Date: Mon, 08 Aug 2016 11:21:38 +0300 [thread overview]
Message-ID: <8760rbzn59.fsf@gmail.com> (raw)
In-Reply-To: <147063086382.16312.14483597599827932971@what> (Troy Sankey's message of "Mon, 08 Aug 2016 00:34:23 -0400")
> From 0a134eaf40aa9dd6fa5e2e24e3d226203a03da73 Mon Sep 17 00:00:00 2001
> From: Troy Sankey <sankeytms@gmail.com>
> Date: Sun, 7 Aug 2016 13:26:30 -0400
> Subject: [PATCH 2/3] gnu: Add python-notmuch
>
> ---
> gnu/packages/mail.scm | 42 ++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 42 insertions(+)
>
> diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
> index 82e35fb..1634d86 100644
> --- a/gnu/packages/mail.scm
> +++ b/gnu/packages/mail.scm
> @@ -517,6 +517,48 @@ ing, and tagging large collections of email messages.")
> useful for email address completion.")
> (license license:expat)))
>
> +(define-public python-notmuch
> + (package
> + (name "python-notmuch")
> + (version "0.22.1")
> + (source (origin
> + (method url-fetch)
> + ;; notmuch python bindings are now unavailable on pypi. The
> + ;; bindings are distributed via the notmuch release tarball.
> + (uri (string-append
> + "https://notmuchmail.org/releases/notmuch-"
> + version
> + ".tar.gz"))
> + (sha256
> + (base32
> + "0jwpda3q023dn3sp41n8648951i7iagfv8zzpriv7hpkjivlafg7"))))
> + (build-system python-build-system)
> + (inputs `(("notmuch" ,notmuch)))
> + (arguments
> + `(#:tests? #f ; no "test" target
> + #:phases
> + (modify-phases %standard-phases
> + ;; this python package lives in a subdirectory of the notmuch source
> + ;; tree, so chdir into it before building:
> + (add-before 'build 'chdir
> + (lambda* (#:key inputs outputs #:allow-other-keys)
> + (chdir "bindings/python")))
I'm going to write it like this:
(add-after 'unpack 'enter-python-dir
(lambda _ (chdir "bindings/python") #t))
Although the phase succeeds without this trailing #t, but it is more
accurate to use it. The thing is: if a build phase succeeds, it should
return non-false value while the value of 'chdir' is unspecified.
> + ;; make sure the correct notmuch shared library gets loaded:
> + (add-before
> + 'build 'set-libnotmuch-file-name
> + (lambda* (#:key inputs #:allow-other-keys)
> + (let ((notmuch (assoc-ref inputs "notmuch")))
> + (substitute* "notmuch/globals.py"
> + (("libnotmuch\\.so\\.")
> + (string-append notmuch "/lib/libnotmuch.so.")))
> + #t))))))
> + (home-page "http://notmuchmail.org/")
> + (synopsis "Python bindings of the Notmuch mail indexing library")
> + (description
> + "This package provides Python bindings to use the Notmuch mail indexing
> +and search library.")
> + (license gpl3+)))
> +
> (define-public python2-notmuch
> (package
> (name "python2-notmuch")
> --
> 2.1.4
I will commit this patchset in a couple of days if there will be no
other comments, thanks!
And thanks to ng0 for commenting!
--
Alex
next prev parent reply other threads:[~2016-08-08 8:21 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-07 18:55 [PATCH] update notmuch and python bindings Troy Sankey
2016-08-07 19:29 ` ng0
2016-08-07 20:40 ` Troy Sankey
2016-08-07 22:04 ` ng0
2016-08-08 8:20 ` Alex Kost
2016-08-07 22:24 ` ng0
2016-08-08 4:34 ` Troy Sankey
2016-08-08 7:05 ` ng0
2016-08-08 7:42 ` ng0
2016-08-08 13:31 ` Troy Sankey
2016-08-08 8:21 ` Alex Kost [this message]
2016-08-11 15:18 ` Alex Kost
2016-08-08 21:30 ` Leo Famulari
2016-08-08 8:35 ` Alex Kost
2016-08-08 15:07 ` Troy Sankey
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=8760rbzn59.fsf@gmail.com \
--to=alezost@gmail.com \
--cc=guix-devel@gnu.org \
--cc=sankeytms@gmail.com \
/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.