From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id qkgpNL5xM2L3FQEAgWs5BA (envelope-from ) for ; Thu, 17 Mar 2022 18:37:02 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id CPujML5xM2K1aAEA9RJhRA (envelope-from ) for ; Thu, 17 Mar 2022 18:37:02 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 455AA6201 for ; Thu, 17 Mar 2022 18:37:02 +0100 (CET) Received: from localhost ([::1]:51930 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nUu3Y-0007Io-VG for larch@yhetil.org; Thu, 17 Mar 2022 13:37:00 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47688) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nUu0g-0002mD-AZ for guix-patches@gnu.org; Thu, 17 Mar 2022 13:34:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:32969) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nUu0g-0006aw-0d for guix-patches@gnu.org; Thu, 17 Mar 2022 13:34:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nUu0f-0000MD-U6 for guix-patches@gnu.org; Thu, 17 Mar 2022 13:34:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54396] [PATCH v2] [WIP] gnu: python-notmuch2: Fix build. Resent-From: Tanguy LE CARROUR Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 17 Mar 2022 17:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54396 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Liliana Marie Prikler Cc: 54396@debbugs.gnu.org Received: via spool by 54396-submit@debbugs.gnu.org id=B54396.16475383891300 (code B ref 54396); Thu, 17 Mar 2022 17:34:01 +0000 Received: (at 54396) by debbugs.gnu.org; 17 Mar 2022 17:33:09 +0000 Received: from localhost ([127.0.0.1]:55099 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nUtzo-0000Ku-KZ for submit@debbugs.gnu.org; Thu, 17 Mar 2022 13:33:08 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:37367) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nUtzn-0000KO-0o for 54396@debbugs.gnu.org; Thu, 17 Mar 2022 13:33:07 -0400 Received: (Authenticated sender: tanguy@bioneland.org) by mail.gandi.net (Postfix) with ESMTPSA id 569AC24000B; Thu, 17 Mar 2022 17:32:59 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable References: <20220316111624.26189-1-tanguy@bioneland.org> <6b3d3874c3953688431be77f08989ef709780443.camel@ist.tugraz.at> <164743841502.31835.14352244026552742248@localhost> <164744931122.17491.16594765317356733408@localhost> <4235d01b2b9f335451e4715ea90fbe92d8ce7f91.camel@ist.tugraz.at> <164751023805.11899.12185326929295576108@localhost> <7ef5790e1f6c92df4cb03687502e45634af4cb59.camel@ist.tugraz.at> From: Tanguy LE CARROUR In-Reply-To: <7ef5790e1f6c92df4cb03687502e45634af4cb59.camel@ist.tugraz.at> Date: Thu, 17 Mar 2022 18:32:59 +0100 Message-ID: <164753837946.17064.8028005328264062282@localhost> User-Agent: alot/0.10 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1647538622; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=JGolwhNKx+tyrKslZn9mik6txM6GmfqMc5EWJbmDJTA=; b=ERFI3Ra1QvXEaa/LMC+fHzggAw8b1o8wrLF3CkiEFt/sbVHEir4bxpkbJ3O89Ev3tW7LS7 neSjsPUsM8s7/rrki5w2A6FCrSxVM+2II2Ss2WdwpxeOq9WjAES1honZw/3ajsBeuuUZnd GVsy8lXdsuifIGAo+gUidNzCuzzK5n+R4qcjGWdI3hqPQcQHjtRI8RKhsClLqF/TsucW1s UDC87yyre/VnJcQuHUZURs4SPnTOrAlFTd/4bGnOWqh9357ARoRMAG2Vr1eyZdwskfCt+K VElz/NUNqjO+rlbQUSBgR3xsA8rVfx66FvIEdahmx6cdwsmhFcsuSZP7+LJRsg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1647538622; a=rsa-sha256; cv=none; b=akK7ENrEtGDmoWdTS56fubhT5CPDZne0sc5IOLLWi/0mv8d4YUnkM7jy2TdLKu49upxWqL FVo7ijaQtkcWBg2KJOmHuiQUUikWa45SaFsIFUyLPt4cTBDushP5mwD6cRI64DOKvHlGZY iH5jxxPp07tDgvNOUqpTroXd+2ifbcOFEzUHlPMbVUoHYfKYo6f8Km0hTIqDmpYA90z3XB jAmhGRitUQrPFCLsgWoDCsRBQVypiIDlgji/OCfei8d47P9d9AfFF/5XiwhZNDBYI40Dxa xJFK1yT2Jas9WAqPR98PL64haly2/ryKBjxfcKV48U9q9MxFymOUIwQWEcrubw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.65 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 455AA6201 X-Spam-Score: -2.65 X-Migadu-Scanner: scn1.migadu.com X-TUID: 1jCSGQyqN2Lz 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".=C2=A0 > > > > > The dirname is important here, since both constants want > > > > > directories.=20 > > > > > Alternatively, forgoing those constants might be a good idea, > > > > > but is not worth investing too much time in. > > > >=20 > > > > So, I'm leaving those as they are for now. > > > I think you misunderstood me.=C2=A0 It is absolutely necessary that y= ou > > > instantiate these variables correctly.=C2=A0 It is not necessary to > > > substitute* their uses. > >=20 > > 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=3D" "'" (dirname (search-input-file inputs "include/notmuch.h")) "'\= n" "NOTMUCH_LIB_DIR=3D" "'" (dirname (search-input-file inputs "lib/libnotmuch.so")) "'"= )))))) ``` > > > substitute* is not nice when dealing with multi-line expressions.=C2= =A0 > > > I think you could replace NOTMUCH_VERSION_FILE with '/dev/null' and > > > "VERSION =3D .*" with (string-append "VERSION =3D " #$version). > >=20 > > 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=3DVERSION,") (string-append "version=3D'" ,(package-version this-package) "',"))= ))) ``` I'll submit a new patch later this week with the gexp version!=E2=80=A6 if I manage to write it! ^_^' Thanks again for your valuable advice and time! --=20 Tanguy