From: Tanguy LE CARROUR <tanguy@bioneland.org>
To: Liliana Marie Prikler <liliana.prikler@ist.tugraz.at>
Cc: 54396@debbugs.gnu.org
Subject: [bug#54396] [PATCH v2] [WIP] gnu: python-notmuch2: Fix build.
Date: Thu, 17 Mar 2022 18:32:59 +0100 [thread overview]
Message-ID: <164753837946.17064.8028005328264062282@localhost> (raw)
In-Reply-To: <7ef5790e1f6c92df4cb03687502e45634af4cb59.camel@ist.tugraz.at>
Hi Liliana,
Quoting Liliana Marie Prikler (2022-03-17 10:51:41)
> Am Donnerstag, dem 17.03.2022 um 10:43 +0100 schrieb Tanguy LE CARROUR:
> > Quoting Liliana Marie Prikler (2022-03-17 07:59:48)
> > > Am Mittwoch, dem 16.03.2022 um 17:48 +0100 schrieb Tanguy LE
> > > CARROUR:
> > > > > That is actually a mistake on my part, search-input-file should
> > > > > search inputs for "include/notmuch.h" and likewise
> > > > > "lib/libnotmuch.so".
> > > > > The dirname is important here, since both constants want
> > > > > directories.
> > > > > Alternatively, forgoing those constants might be a good idea,
> > > > > but is not worth investing too much time in.
> > > >
> > > > So, I'm leaving those as they are for now.
> > > I think you misunderstood me. It is absolutely necessary that you
> > > instantiate these variables correctly. It is not necessary to
> > > substitute* their uses.
> >
> > You right, I **totally** misunderstood you! Sorry!
> > I didn't pay attention to the fact that I left the actual file names
> > in, instead of using the folder names.
> > Hope I've gotten it right this time and that you are not getting
> > tired of reviewing my patch! :-)
> You'd do well using search-input-file as I've suggested for a while now
> ;)
You're right! So, now, it looks like:
```
(add-after 'enter-python-dir 'create-notmuch-config
(lambda* (#:key inputs #:allow-other-keys)
(with-output-to-file "_notmuch_config.py"
(lambda _
(display
(string-append
"NOTMUCH_INCLUDE_DIR="
"'" (dirname (search-input-file inputs "include/notmuch.h")) "'\n"
"NOTMUCH_LIB_DIR="
"'" (dirname (search-input-file inputs "lib/libnotmuch.so")) "'"))))))
```
> > > substitute* is not nice when dealing with multi-line expressions.
> > > I think you could replace NOTMUCH_VERSION_FILE with '/dev/null' and
> > > "VERSION = .*" with (string-append "VERSION = " #$version).
> >
> > Oh, looks like gexp magic to me, right? I'm not (yet) comfortable
> > with it! So I came up with another version. Seems to work as I've
> > built, installed and used it!
> I think we need to convert this package to the newstyle anyway,
> not something you have to do, but it'd be appreciated if you first
> translated the existing package to use gexps and then applied your
> modifications on top. That being said, using this-package is IIRC fine
> for such purposes.
OK, I'll try to do that. But, in order not to spam you with stupid code and
questions, I'll think about it for few days and probably do it at the
week end.
> Regarding NOTMUCH_VERSION_FILE, I don't think we should put an
> "implemented" value into a file that (as far as I can see) ends up
> being installed. So here you have to substitute* the use in setup.py
> instead.
It now looks like this:
```
(add-after 'create-notmuch-config 'patch-setup.py
(lambda _
(substitute* "setup.py"
(("NOTMUCH_VERSION_FILE")
"'/dev/null'")
(("version=VERSION,")
(string-append "version='" ,(package-version this-package) "',")))))
```
I'll submit a new patch later this week with the gexp version!… if I
manage to write it! ^_^'
Thanks again for your valuable advice and time!
--
Tanguy
next prev parent reply other threads:[~2022-03-17 17:37 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 ` [bug#54396] [PATCH v2] " Tanguy Le Carrour
2022-03-16 11:28 ` 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 [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=164753837946.17064.8028005328264062282@localhost \
--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 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.