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 6EzTAVr1OWLJjQAAgWs5BA (envelope-from ) for ; Tue, 22 Mar 2022 17:12:10 +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 sNRUOln1OWK/cAEA9RJhRA (envelope-from ) for ; Tue, 22 Mar 2022 17:12:09 +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 5F43E2D2B0 for ; Tue, 22 Mar 2022 17:12:09 +0100 (CET) Received: from localhost ([::1]:47064 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nWh7A-0004IB-2W for larch@yhetil.org; Tue, 22 Mar 2022 12:12:08 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47414) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nWh74-0004HP-LJ for guix-patches@gnu.org; Tue, 22 Mar 2022 12:12:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:47801) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nWh74-0005Zw-8v for guix-patches@gnu.org; Tue, 22 Mar 2022 12:12:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nWh74-0003jw-1G for guix-patches@gnu.org; Tue, 22 Mar 2022 12:12:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54396] [PATCH v6] gnu: python-notmuch2: Fix build. References: <20220315093814.25033-1-tanguy@bioneland.org> In-Reply-To: <20220315093814.25033-1-tanguy@bioneland.org> Resent-From: Tanguy Le Carrour Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 22 Mar 2022 16:12: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.prikler@ist.tugraz.at, 54396@debbugs.gnu.org Cc: Tanguy Le Carrour Received: via spool by 54396-submit@debbugs.gnu.org id=B54396.164796551714366 (code B ref 54396); Tue, 22 Mar 2022 16:12:01 +0000 Received: (at 54396) by debbugs.gnu.org; 22 Mar 2022 16:11:57 +0000 Received: from localhost ([127.0.0.1]:41698 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nWh6t-0003jX-KP for submit@debbugs.gnu.org; Tue, 22 Mar 2022 12:11:57 -0400 Received: from relay10.mail.gandi.net ([217.70.178.230]:54675) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nWh6r-0003jK-Pr for 54396@debbugs.gnu.org; Tue, 22 Mar 2022 12:11:50 -0400 Received: (Authenticated sender: tanguy@bioneland.org) by mail.gandi.net (Postfix) with ESMTPSA id BF93C240004; Tue, 22 Mar 2022 16:11:42 +0000 (UTC) From: Tanguy Le Carrour Date: Tue, 22 Mar 2022 17:11:26 +0100 Message-Id: <20220322161126.30669-1-tanguy@bioneland.org> X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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=1647965529; 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=b+7TBmH0k3qLS2rZ4UTlYbdzRFem/OGG6vZ6DI5Ijsk=; b=dH7FcrH4CiwYe/MlfuT7p0Efi7YhFfmHHGVNz7GjxGD5swI7f6SC6HlIwXz3pzq0fFA3DR s9zj7A+f46TAc3K+Ot5LDjoxOySq+v41wqS+RphkMkNkHxx+GOjUNngRQbgg8Dj6sm/1uk IOp3/byBeG//oBtYDRkV2BslqW0iA6GpmWp16JG2T2nKviK8xL8DgkKES3DIWovchkekkd XZ8YRUoutkCArEUdgqsXs5/ln0YRT0iS1lQFRijnFLio46XVHaTPjTXi5+iBq+k0mVjiBI FCRd2Ie6pw8n3Vgt/mm3sQxkfsUz4yT9zNtG38ptySNYqIvjnjiduTbB+PeTKQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1647965529; a=rsa-sha256; cv=none; b=rOQKa+gRoi3/C3M1kYqyKGU3OIlXEvGAThgBjZkcDJsHZRNSZfwDcofz8ingfd3uYGFxQE fRuEfSOeedF1/9uGs47hBpWN22Gf9+6av18Syw5zc1YisgLbamogf4m20CRc3yhC0kZPf+ F/x9S8g3HHb5oB2ROMBFRSpH07pEUuyuNm9z9MQMymVR8gpLqo7f15rY4q8mtYDKWarFjZ kYWFhvMu8KSj2mfUlXpvPxC0bivP0Lb3RWUG8PgZ86ayCbPxrAK3KCGF9ISSCvJ8jaJh3M aZnXskhD1e2ayfhgRhymWTGsDgeDUptMlnfbEuOfB4BLBIJDb+nmQYz7G/3/dw== 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.61 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: 5F43E2D2B0 X-Spam-Score: -2.61 X-Migadu-Scanner: scn0.migadu.com X-TUID: yvKsmVdiC56y Hi Liliana, Sorry, but I didn't find time last week-end to migrate the package definition to the new style! :-( But, just in case in would make sense to fix the build before I found some time to do my homework, here is the patch! Cheers, -- Tanguy * gnu/packages/mail.scm (python-notmuch2): (%standard-phases): Add 'create-notmuch-config' and 'patch-setup.py' after 'enter-python-dir'. --- gnu/packages/mail.scm | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index d253ca7011..1a11163be6 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -28,7 +28,7 @@ ;;; Copyright © 2018 Alex Vong ;;; Copyright © 2018 Gábor Boskovits ;;; Copyright © 2018, 2019, 2020, 2021, 2022 Ricardo Wurmus -;;; Copyright © 2019, 2020, 2021 Tanguy Le Carrour +;;; Copyright © 2019, 2020-2022 Tanguy Le Carrour ;;; Copyright © 2020 Vincent Legoll ;;; Copyright © 2020 Justus Winter ;;; Copyright © 2020 Eric Brown @@ -1493,7 +1493,27 @@ (define-public python-notmuch2 ;; This python package lives in a subdirectory of the notmuch source ;; tree, so chdir into it before building. (add-after 'unpack 'enter-python-dir - (lambda _ (chdir "bindings/python-cffi")))))) + (lambda _ (chdir "bindings/python-cffi"))) + ;; python-build-system does not invoke the configure script + ;; so _notmuch_config.py is missing + (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")) "'")))))) + ;; 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" + (("NOTMUCH_VERSION_FILE") + "'/dev/null'") + (("version=VERSION,") + (string-append "version='" ,(package-version this-package) "',")))))))) (synopsis "Pythonic bindings for the notmuch mail database using CFFI") (license license:gpl3+))) -- 2.34.0