[GRASS-dev] Re: [GRASS GIS] #38: configure.in: wxwidgets and python checks

Martin Landa landa.martin at gmail.com
Tue Feb 12 09:59:49 EST 2008


Hi,

2008/2/11, Glynn Clements <glynn at gclements.plus.com>:
> Martin Landa wrote:
> > > In any case, that's why we need to allow e.g.
> > > --with-python=python2.4-config
> > >
> > > > I will upgrade configure to check also for python${PYVERSION}-config.
> > >
> > > Where are you going to get ${PYVERSION} from before you've located the
> > > python-config program? If there is more than one version installed,
> > > invoking "python" won't necessarily use the right version.
> >
> > Python version is determined from small python script(s).
> >
> > 1656          # find out python version
> > 1657          AC_MSG_CHECKING(Python version)
> > 1658          PYVERSION=`$PYTHON_BIN -c ['import sys; print sys.version[:3]'`]
> > 1659          PYMAJVERSION=`$PYTHON_BIN -c ['import sys; print sys.version[:1]'`]
> > 1660          PYMINVERSION=`$PYTHON_BIN -c ['import sys; print sys.version[2:3]'`]
> > 1661          AC_MSG_RESULT($PYVERSION)
> > 1662          AC_SUBST(PYVERSION)
> >
> > I didn't change this part of configure script.
> >
> > The problem with python-config is that there is *no* version switch.
> >
> > Usage: /usr/bin/python-config
> > [--prefix|--exec-prefix|--includes|--libs|--cflags|--ldflags|--help]
> >
> > So how to determine python version using python-config?
> >
> > You can currently run with --with-python=/usr/bin/python2.5 to force
> > using version 2.5.
>
> Each version of python should have its own python-config which
> provides switches relevant to that version.
>
> E.g. if you use --with-python=python2.4-config, you'll get the
> switches for 2.4.
>
> In any case, if there is more than one version on offer, it's
> preferable to require the user to explicitly choose a version than to
> silently choose one for them.

The last version of patch [1] uses --with-python=[path/python-config]
approach. Since I am not autoconf guru I cannot comment Ivan's notes.

Martin

[1] http://trac.osgeo.org/grass/attachment/ticket/38/configure_wx-3.diff

-- 
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa *


More information about the grass-dev mailing list