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 701986DE0EF3 for ; Mon, 4 Nov 2019 14:04:07 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.405 X-Spam-Level: X-Spam-Status: No, score=0.405 tagged_above=-999 required=5 tests=[AWL=-0.247, 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 9Dp7qUNA1NlZ for ; Mon, 4 Nov 2019 14:04:06 -0800 (PST) Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) by arlo.cworth.org (Postfix) with ESMTP id C76566DE0EEA for ; Mon, 4 Nov 2019 14:04:05 -0800 (PST) Received: from guru.guru-group.fi (localhost [IPv6:::1]) by guru.guru-group.fi (Postfix) with ESMTP id A1045100199; Tue, 5 Nov 2019 00:04:03 +0200 (EET) From: Tomi Ollila To: David Bremner , notmuch@notmuchmail.org Subject: Re: [PATCH 4/5] tests: run python-cffi tests In-Reply-To: References: <20191104013927.17037-1-david@tethera.net> <20191104013927.17037-5-david@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: Mon, 04 Nov 2019 22:04:07 -0000 On Mon, Nov 04 2019, Tomi Ollila wrote: > > as for checking pytest existence, the following works somewhat: > > ~/test-venv/bin/python3 -m pytest --version > > It prints the version, then exists. Could not figure out how to request > specific version in quick look (10 min search/trial/error session), > parsing version output is so... :/ Hah, dumped ~/test-venv/. so retry... $ python3 -m venv ~/test-venv $ ~/test-venv/bin/pip3 install pytest $ ~/test-venv/bin/python3 >>> import pytest >>> dir(pytest) >>> pytest.__version__ prints out '5.2.2'. argh, string again (in addition to resorting to __...__ names/attributes of whatever these are called in python ;). anyway, even parsing this version string in python than doing it in shell script would be better...(*) anything better ? Tomi (*) got exhausted when looking through this: https://stackoverflow.com/questions/11887762/how-do-i-compare-version-numbers-in-python