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.

-- 
Glynn Clements <[EMAIL PROTECTED]>
_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to