From patchwork Tue Mar 22 16:11:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tanguy LE CARROUR X-Patchwork-Id: 38005 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 173A727BBE9; Tue, 22 Mar 2022 16:12:15 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id CE60827BBEA for ; Tue, 22 Mar 2022 16:12:10 +0000 (GMT) Received: from localhost ([::1]:47064 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nWh7B-0004IB-VR for patchwork@mira.cbaines.net; Tue, 22 Mar 2022 12:12:09 -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 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches 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, 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+)))