From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id aGSVAoJt315pWAAA0tVLHw (envelope-from ) for ; Tue, 09 Jun 2020 11:07:46 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id WOYOOoFt315OBAAAB5/wlQ (envelope-from ) for ; Tue, 09 Jun 2020 11:07:45 +0000 Received: from arlo.cworth.org (arlo.cworth.org [50.126.95.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 721189404D5 for ; Tue, 9 Jun 2020 11:07:43 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 8AADC6DE0E8C; Tue, 9 Jun 2020 04:07:38 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tEmFr-G9nLfm; Tue, 9 Jun 2020 04:07:38 -0700 (PDT) Received: from arlo.cworth.org (localhost [IPv6:::1]) by arlo.cworth.org (Postfix) with ESMTP id 7CC456DE0B6D; Tue, 9 Jun 2020 04:07:37 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 6CBC86DE0B6D for ; Tue, 9 Jun 2020 04:07:35 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 83tN_YQWBdif for ; Tue, 9 Jun 2020 04:07:34 -0700 (PDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id 63A806DE0B3E for ; Tue, 9 Jun 2020 04:07:34 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.92) (envelope-from ) id 1jic6L-0008Lo-LH; Tue, 09 Jun 2020 07:07:29 -0400 Received: (nullmailer pid 153972 invoked by uid 1000); Tue, 09 Jun 2020 11:07:28 -0000 From: David Bremner To: Tomi Ollila , notmuch@notmuchmail.org Subject: Re: [PATCH] configure: use cffi.FFI().verify() to test buildability of CFFI bindings In-Reply-To: <20200609053446.11478-1-tomi.ollila@iki.fi> References: <20200609053446.11478-1-tomi.ollila@iki.fi> Date: Tue, 09 Jun 2020 08:07:28 -0300 Message-ID: <87pna8fqfj.fsf@tethera.net> MIME-Version: 1.0 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: tomi.ollila@iki.fi Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: notmuch-bounces@notmuchmail.org Sender: "notmuch" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 50.126.95.6 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Spam-Score: -1.01 X-TUID: JqaqkcqOdUjl Tomi Ollila writes: > Checking existence of pyconfig.h to determine whether CFFI-based > notmuch bindings are buildable is not enough; for example Fedora 32 > ships pyconfig.h in python3-libs package, but python3-devel is required > to be installed for the bindings to build. > > Executing cffi.FFI().verify() is pretty close to what is done in > bindings/python-cffi/notmuch2/_build.py to get the c code part of the > bindings built. For me (debian 10, python 3.8.3) this leaves __pycache__ in the top directory. This is particularly unfortunate when configure is invoked by "make clean"; I know, who runs clean first, except all debian packages ;). I tried adding a call to "cffi.verifier.cleanup_tmpdir()" per the cffi docs, but there seems to be a nested __pycache__ directory that is not cleaned up by that (or is created later). I guess the best option is just to rm -rf __pycache__ at the appropriate point in configure?