From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 51D056DE0F4A for ; Sat, 9 Nov 2019 13:59:45 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.403 X-Spam-Level: X-Spam-Status: No, score=0.403 tagged_above=-999 required=5 tests=[AWL=-0.249, SPF_NEUTRAL=0.652] autolearn=disabled 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 mF8sfDfzsNI5 for ; Sat, 9 Nov 2019 13:59:43 -0800 (PST) Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) by arlo.cworth.org (Postfix) with ESMTP id 629406DE0EF2 for ; Sat, 9 Nov 2019 13:59:42 -0800 (PST) Received: from guru.guru-group.fi (localhost [IPv6:::1]) by guru.guru-group.fi (Postfix) with ESMTP id 32BC1100199; Sat, 9 Nov 2019 23:59:38 +0200 (EET) From: Tomi Ollila To: David Bremner , notmuch@notmuchmail.org Subject: Re: [PATCH 4/5] tests: run python-cffi tests In-Reply-To: <8736exx23i.fsf@tethera.net> References: <20191104013927.17037-1-david@tethera.net> <20191104013927.17037-5-david@tethera.net> <87h83hsq4o.fsf@tethera.net> <8736exx23i.fsf@tethera.net> User-Agent: Notmuch/0.28.3+84~g41389bb (https://notmuchmail.org) Emacs/25.2.1 (x86_64-unknown-linux-gnu) X-Face: HhBM'cA~ MIME-Version: 1.0 Content-Type: text/plain 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: , X-List-Received-Date: Sat, 09 Nov 2019 21:59:45 -0000 On Fri, Nov 08 2019, David Bremner wrote: > Tomi Ollila writes: > >> >> Right -- just that pytest-3 may not be available -- to iterate (tested)... >> >> if ${NOTMUCH_PYTHON} -m pytest -c $conf --version >/dev/null 2>&1; then >> > > The problem with this is that it might pass if pytest is only installed > for python2. What is the minimum python3 version supported -- In the previous email thread all references show python 3.7.... Anyway, in that wip/cffi "branch" commit 97caf16c15d (check for python cffi module) could also include check for minimum python version, e.g. +printf "Checking for python 3 cffi... " +if "${NOTMUCH_PYTHON}" -c 'import sys,cffi; assert sys.version_info >= (3,7)' 2>/dev/null; then + printf "Yes.\n" + have_python3_cffi=1 +else + printf "No.\n" + have_python3_cffi=0 +fi (adjust (3,7) above to any suitable smaller value =D) Tomi > >> (in this particular case redirecting both stdout and stderr is needed >> to silence noise in all 'ordinary' cases, being >> 1) pytest module not available -- silence stderr >> 2) pytest version not new enough -- silence stderr >> 3) pytest exists and is new enought -- silence stdout ) > > agreed > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > https://notmuchmail.org/mailman/listinfo/notmuch