From: Tanguy Le Carrour <tanguy@bioneland.org>
To: liliana.prikler@ist.tugraz.at
Cc: Tanguy Le Carrour <tanguy@bioneland.org>, 54396@debbugs.gnu.org
Subject: [bug#54396] [PATCH v2] [WIP] gnu: python-notmuch2: Fix build.
Date: Wed, 16 Mar 2022 12:16:24 +0100 [thread overview]
Message-ID: <20220316111624.26189-1-tanguy@bioneland.org> (raw)
In-Reply-To: <20220315093814.25033-1-tanguy@bioneland.org>
Hi Liliana,
Did you have something along these lines in mind?
I wanted to add the `create-notmuch-config` phase after the `enter-python-dir`,
but I don't know how to get the source folder from there. I suppose
there's a way to get the `../../` of the `cwd`, but I don't (yet) know how.
The generated contains the expected paths:
```
NOTMUCH_VERSION_FILE='/tmp/guix-build-python-notmuch2-0.35.drv-0/notmuch-0.35/version.txt'
NOTMUCH_INCLUDE_DIR='/tmp/guix-build-python-notmuch2-0.35.drv-0/notmuch-0.35/lib'
NOTMUCH_LIB_DIR='/tmp/guix-build-python-notmuch2-0.35.drv-0/notmuch-0.35/lib'
```
… but they **always** reference `drv-0`, even if it's not the first build!?
For instance:
```
$ cat /tmp/guix-build-python-notmuch2-0.35.drv-6/notmuch-0.35/bindings/python-cffi/_notmuch_config.py [profile] guix-dev
NOTMUCH_VERSION_FILE='/tmp/guix-build-python-notmuch2-0.35.drv-0/notmuch-0.35/version.txt'
NOTMUCH_INCLUDE_DIR='/tmp/guix-build-python-notmuch2-0.35.drv-0/notmuch-0.35/lib'
NOTMUCH_LIB_DIR='/tmp/guix-build-python-notmuch2-0.35.drv-0/notmuch-0.35/lib'
```
Does it matter?!
Regards,
--
Tanguy
---
gnu/packages/mail.scm | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index d253ca7011..f6769cad02 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -28,7 +28,7 @@
;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
;;; Copyright © 2018 Gábor Boskovits <boskovits@gmail.com>
;;; Copyright © 2018, 2019, 2020, 2021, 2022 Ricardo Wurmus <rekado@elephly.net>
-;;; Copyright © 2019, 2020, 2021 Tanguy Le Carrour <tanguy@bioneland.org>
+;;; Copyright © 2019, 2020-2022 Tanguy Le Carrour <tanguy@bioneland.org>
;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
;;; Copyright © 2020 Justus Winter <justus@sequoia-pgp.org>
;;; Copyright © 2020 Eric Brown <ecbrown@ericcbrown.com>
@@ -1490,9 +1490,21 @@ (define-public python-notmuch2
(arguments
`(#:phases
(modify-phases %standard-phases
+ ;; configure generates `bindings/python-cffi/_notmuch_config.py`
+ ;; https://git.notmuchmail.org/git?p=notmuch;a=commit;h=7b5921877e748338359a25dae578771f768183af
+ (add-after 'unpack 'create-notmuch-config
+ (lambda _
+ (let ((cwd (getcwd)))
+ (with-output-to-file "bindings/python-cffi/_notmuch_config.py"
+ (lambda _
+ (display
+ (string-append
+ "NOTMUCH_VERSION_FILE='" cwd "/version.txt'\n"
+ "NOTMUCH_INCLUDE_DIR='" cwd "/lib'\n"
+ "NOTMUCH_LIB_DIR='" cwd "/lib'")))))))
;; This python package lives in a subdirectory of the notmuch source
;; tree, so chdir into it before building.
- (add-after 'unpack 'enter-python-dir
+ (add-after 'create-notmuch-config 'enter-python-dir
(lambda _ (chdir "bindings/python-cffi"))))))
(synopsis "Pythonic bindings for the notmuch mail database using CFFI")
(license license:gpl3+)))
--
2.34.0
next prev parent reply other threads:[~2022-03-16 11:17 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-15 9:38 [bug#54396] [PATCH] [WIP] gnu: python-notmuch2: Fix build Tanguy Le Carrour
2022-03-15 10:11 ` Liliana Marie Prikler
2022-03-15 10:58 ` Tanguy LE CARROUR
2022-03-15 16:04 ` Maxime Devos
2022-03-16 7:57 ` Tanguy LE CARROUR
2022-03-16 11:16 ` Tanguy Le Carrour [this message]
2022-03-16 11:28 ` [bug#54396] [PATCH v2] " Liliana Marie Prikler
2022-03-16 13:46 ` Tanguy LE CARROUR
2022-03-16 14:02 ` Liliana Marie Prikler
2022-03-16 16:48 ` Tanguy LE CARROUR
2022-03-17 6:59 ` Liliana Marie Prikler
2022-03-17 9:43 ` Tanguy LE CARROUR
2022-03-17 9:51 ` Liliana Marie Prikler
2022-03-17 17:32 ` Tanguy LE CARROUR
2022-03-22 16:11 ` [bug#54396] [PATCH v6] " Tanguy Le Carrour
2022-03-23 20:15 ` bug#54396: " Liliana Marie Prikler
2022-03-24 7:11 ` [bug#54396] " Tanguy LE CARROUR
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=20220316111624.26189-1-tanguy@bioneland.org \
--to=tanguy@bioneland.org \
--cc=54396@debbugs.gnu.org \
--cc=liliana.prikler@ist.tugraz.at \
/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).