From ml at mareichelt.com Fri Apr 1 10:52:43 2022 From: ml at mareichelt.com (Markus Reichelt) Date: Fri, 1 Apr 2022 16:52:43 +0200 Subject: [botan-devel] questions about the python configure.py stanza Message-ID: Hi, wrt Botan 2.19.1 I wonder, is there a preference for a python version when invoking python configure.py .... or doesn't it matter at all? In case it doesn't I'm inclined to pin that to python3 (let's see if that breaks anyting). How I read this with regard to the python bindings: If the python bindings are used by some py2 app, the invokation needs to be with python2, and if a py3 app uses the binding with python3. now the magic question: if both py2 and py3 apps want to use the same Botan install, is it wise to install Botan with a python2 configure.py compilation first, and then again with a python3 configure.py compilation? (right now that is a rather theoretical question, but I do wonder just in case something like that pops up, even given the graveyard dance of python2) maintainer of Botan at slackbuilds.org speaking here. thanks in advance. Regards, Markus From jack at randombit.net Fri Apr 1 11:30:01 2022 From: jack at randombit.net (Jack Lloyd) Date: Fri, 1 Apr 2022 11:30:01 -0400 Subject: [botan-devel] questions about the python configure.py stanza In-Reply-To: References: Message-ID: On Fri, Apr 01, 2022 at 04:52:43PM +0200, Markus Reichelt wrote: > Hi, > > wrt Botan 2.19.1 > > I wonder, is there a preference for a python version when invoking > > python configure.py .... > > or doesn't it matter at all? > > In case it doesn't I'm inclined to pin that to python3 > (let's see if that breaks anyting). Both Python2.7 and Python3 are fully supported with configure.py. Using 2.7 for setting up the build will be supported for as long as possible just to avoid inconvenencing people, but at this point Python3 is preferable and more actively tested. It occurs to me in writing this that our CI these days does not even have a Python2 based builder anymore, so regressions are quite possible. > How I read this with regard to the python bindings: > If the python bindings are used by some py2 app, the invokation needs > to be with python2, and if a py3 app uses the binding with python3. That is the default, you can override this with an option to configure.py: --with-python-versions=2.7,3.10 and it will install the bindings into each. > now the magic question: if both py2 and py3 apps want to use the same > Botan install, is it wise to install Botan with a python2 > configure.py compilation first, and then again with a python3 > configure.py compilation? > > (right now that is a rather theoretical question, but I do wonder > just in case something like that pops up, even given the graveyard > dance of python2) No need for this. The library binary itself will be the same regardless of the version of Python used, and botan2.py contains runtime checks using sys.version_info to adapt to running under both Python 2 and Python 3. All you should need to do is either use --with-python-versions, or else some out of band equivalent in your build system, to copy botan2.py into all of the relevent site-packages. Hope this helps! Jack