From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id EL33JqHtKmBoBwAA0tVLHw (envelope-from ) for ; Mon, 15 Feb 2021 21:54:41 +0000 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id oPKaIqHtKmDZUwAAbx9fmQ (envelope-from ) for ; Mon, 15 Feb 2021 21:54:41 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [IPv6:2607:5300:201:3100::1657]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 588821E43F for ; Mon, 15 Feb 2021 22:54:41 +0100 (CET) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 874922069D; Mon, 15 Feb 2021 16:54:35 -0500 (EST) Received: from lahtoruutu.iki.fi (unknown [IPv6:2a0b:5c81:1c1::37]) by mail.notmuchmail.org (Postfix) with ESMTPS id 4BFE71FC6C for ; Mon, 15 Feb 2021 16:54:32 -0500 (EST) Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: too) by lahtoruutu.iki.fi (Postfix) with ESMTPSA id 40D951B00046; Mon, 15 Feb 2021 23:54:21 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1613426061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=ITyTjeHpX0/dVsGMz4V2n9rk0bknXxyUihi7eR1Ey54=; b=Q5jAjiQ+Ndisw+V1SnfMIeO8E4asHHMohH3eqQheplYuJL9BXr1Kwx+tuBJtsYxth5JuRq Fg3lFhnbvwu/su/yekYJWXR1OUK653IlsqzhFtESB87p64uX8PbxDG7/Pc/9umPseh0TWX aSrIOkJPX1L9BElMzVuNiDlHDuAHqghG7IkU44szzsxXR4TGlUWbaGsn3mDcTgKS4M1knw X4kGe3Hwf80gzEevU/lEoGW13R4fP0GyBiqQazR2lzj/Tv3MUkc2pnpGD+rGtqYbL9MLS3 GAMkwITrWaAEKAJJoJxb7aP5zTPxh2cPuRN5bcvLUUAQ6OMa6erwek0GGCwQ8w== From: Tomi Ollila To: notmuch@notmuchmail.org Subject: [PATCH] configure: fix python-cffi out-of-tree build Date: Mon, 15 Feb 2021 23:54:10 +0200 Message-Id: <20210215215410.28668-1-tomi.ollila@iki.fi> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=too smtp.mailfrom=tomi.ollila@iki.fi ARC-Seal: i=1; s=lahtoruutu; d=iki.fi; t=1613426061; a=rsa-sha256; cv=none; b=JKglOV2VfjrE0J73FcVIf8Q1kUXhl9QpARSqMJR1lB6ttWGlkcaQCe4OwAhTBBnknD8VJo G9QX8emH3BWH6ebx7yC7nN4xXRypUiRcGzixVL0Zal5U4B9IQu0hb1QikHuc4undz8Ai8S EK+RsofFXIbjmCgulDKEG4d/KvS60s4sVHDsPyrSE35otCPnksTnqykxlcXywPvDKNxCRT kJYeVBhbXG5iCMVB24DsE+rqgCZP4CxqiRFnTYCE0up5s0DPy/ZoUWD5rf6uRYF1WSno4l X64vLdtyKZ31v3SDtK7NI1NE/D2MWllMBENeTOtaHceVbgGH09hNylQPIGiOcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1613426061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=ITyTjeHpX0/dVsGMz4V2n9rk0bknXxyUihi7eR1Ey54=; b=h6RVf8Ncs7i0vPymYA+CSZXxcW6RLPCjFW4tweN16Ha74BSsdFrH76CDXpDxC8467+Aa10 2SbulMAvVeVrcou5VP7csNFnxAfrfNALaxaMm4ADOKvfYz8UxWkR1EiBf7HF9+K6cPNr4o 4g0W8yWJF2qJjc6xLEYY5z0ROSW2fzb7PiVgeLGc3Ymq3/YzigjTR/cGDSj+r8VY3mm0On tK1ZtxwV8FGHaE/Ur29BPGyj4FmDYnKV3SoFXFTukYimlArY9bZP7jfyJ5aXlW7/Jh1Iob iRTJDytJlaCWseiU+Wnidb3YCWIjKYTqCcHB4TGt3uMNbGN85fpswe3MIueKeA== Message-ID-Hash: EFIORLDAZ3VQDSYLOKAHVH2OL3PARITJ X-Message-ID-Hash: EFIORLDAZ3VQDSYLOKAHVH2OL3PARITJ X-MailFrom: tomi.ollila@iki.fi X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: tomi.ollila@iki.fi X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: 3.55 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=iki.fi header.s=lahtoruutu header.b=Q5jAjiQ+; arc=reject ("signature check failed: fail, {[1] = sig:iki.fi:reject}"); dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 588821E43F X-Spam-Score: 3.55 X-Migadu-Scanner: scn0.migadu.com X-TUID: GjI/g2muwnQc In case of out of tree build: * Copy version.txt and lib/notmuch.h to the root of the python-cffi bindings directory (in addtion to the files already copied there) * Modify _build.py to refer '.' instead of '../../lib' for searching c include files While at it, fixed indentation in related lines from 7 spaces to one tab (like indentation done elsewhere in the same file). --- configure | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/configure b/configure index cfa9c09b..11605942 100755 --- a/configure +++ b/configure @@ -75,9 +75,14 @@ if [ "$srcdir" != "." ]; then # out-of-tree builds (again, not ideal). mkdir bindings/python-cffi cp -a "$srcdir"/bindings/python-cffi/tests \ - "$srcdir"/bindings/python-cffi/notmuch2 \ - "$srcdir"/bindings/python-cffi/setup.py \ - bindings/python-cffi/ + "$srcdir"/bindings/python-cffi/notmuch2 \ + "$srcdir"/bindings/python-cffi/setup.py \ + "$srcdir"/bindings/python-cffi/version.txt \ + "$srcdir"/lib/notmuch.h \ + bindings/python-cffi/ + sed "/include_dirs=/ s|'[.][.]/[.][.]/lib'|'.'|" \ + bindings/python-cffi/notmuch2/_build.py > _build.py.wip + mv _build.py.wip bindings/python-cffi/notmuch2/_build.py fi # Set several defaults (optionally specified by the user in -- 2.29.2