automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Python2 and Python3 checks


From: Nate Bargmann
Subject: Re: Python2 and Python3 checks
Date: Thu, 22 Mar 2018 10:46:43 -0500
User-agent: Mutt/1.6.1 (2016-04-27)

I am dealing with this in the Hamlib project.  We are using the Autoconf
macro from the macro archive and by default it identifies Python2 which
is then passed to Swig to build the Python bindings.  The same macro
also supports Python3 with a bit of care and a couple of extra steps
such as running configure from the directory containing the Swig
bindings directives files as so:

../hamlib/configure --with-python-binding PYTHON_VERSION='3.6'

The two bindings do coexist as they install into independent locations.
I've done a fair amount of testing between scripts written for each and
so far have not received bug reports.

It's possible that I could work up a lot of extra code in configure.ac
and the relevant  Makefile.am, but this was the easiest way for me to
implement and document it.  Packagers can make separate binary packages
for each version of Python in their distribution.

Regardless of how it would be done, Swig needs to be run for each
version, as I understand it.  I suspect this support will require quite
a bit of a single macro.

- Nate

-- 

"The optimist proclaims that we live in the best of all
possible worlds.  The pessimist fears this is true."

Web: http://www.n0nb.us  GPG key: D55A8819  GitHub: N0NB

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]