GNU bug report logs - #54396
[PATCH] [WIP] gnu: python-notmuch2: Fix build.

Previous Next

Package: guix-patches;

Reported by: Tanguy Le Carrour <tanguy <at> bioneland.org>

Date: Tue, 15 Mar 2022 09:40:01 UTC

Severity: normal

Tags: patch

Done: Liliana Marie Prikler <liliana.prikler <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #38 received at 54396 <at> debbugs.gnu.org (full text, mbox):

From: Tanguy LE CARROUR <tanguy <at> bioneland.org>
To: Liliana Marie Prikler <liliana.prikler <at> ist.tugraz.at>
Cc: 54396 <at> debbugs.gnu.org
Subject: Re: [PATCH v2] [WIP] gnu: python-notmuch2: Fix build.
Date: Thu, 17 Mar 2022 10:43:58 +0100
[Message part 1 (text/plain, inline)]
Hi Liliana,


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! :-)


> > > > If I set `NOTMUCH_VERSION_FILE=''`, I get a "file does not exist"
> > > > error at build time. So I decided to set it to `/dev/null`
> > > > instead.
> > > > Or would it be better if I patched `notmuch` to create the actual
> > > > version file?!
> > > I think you ought to debug the build and short-circuit the logic by
> > > inferring the version number directly where it is needed.  Without
> > > actual build output that's as much as I can propose.
> > 
> > Mmm… I've added a new phase to patch the `setup.py`, but couldn't get
> > the version variable to work. Sorry for my… noobiness!? ^_^'
> > 
> > ```
> > ;; version.txt is not included in notmuch, so we patch in the version
> > number
> > (add-after 'create-notmuch-config 'patch-setup.py
> >   (lambda _
> >     (substitute* "setup.py"
> >       (("with open\\(NOTMUCH_VERSION_FILE\\) as fp:") "")
> >       (("    VERSION = fp.read\\(\\).strip\\(\\)") "")
> >       (("version=VERSION,") (string-append "version='" "0.0.0"
> > "',")))))
> > ```
> > 
> > I've tried to replace `0.0.0` with `version` or `,version` but that
> > doesn't seem to be the proper way to do it.
> 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'm attaching v5. Finger crossed! :-)

Thanks again for you time!

-- 
Tanguy
[0001-gnu-python-notmuch2-Fix-build.patch (text/x-diff, attachment)]

This bug report was last modified 3 years and 58 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.