Hi,

On Sat, Apr 19, 2014 at 04:15:21PM +0200, Michael Olbrich wrote:
> On Thu, Apr 17, 2014 at 09:38:36AM +0200, Alexander Aring wrote:
> > Hi,
> > 
> > On Tue, Apr 15, 2014 at 11:36:53AM +0200, Alexander Aring wrote:
> > > Signed-off-by: Alexander Aring <[email protected]>
> > > ---
> > >  configure.ac | 12 ++++++++++++
> > >  1 file changed, 12 insertions(+)
> > > 
> > > diff --git a/configure.ac b/configure.ac
> > > index 2a97944..ce4e539 100644
> > > --- a/configure.ac
> > > +++ b/configure.ac
> > > @@ -304,6 +304,18 @@ AC_ARG_WITH(python, 
> > > AS_HELP_STRING([--with-python],[name of the python executabl
> > >   AC_PATH_PROGS(PYTHON, python2.7 python2.6 python)
> > >   AC_SUBST(PYTHON)
> > >      ])
> > > +
> > > +dnl
> > > +dnl Check for Python 2.x
> > > +dnl
> > > +AC_MSG_CHECKING([check for Python major version])
> > > +PYTHON_MAJOR_VERSION=`$PYTHON -c "import sys; 
> > > print(sys.version_info[[0]])" 2> /dev/null`
> > 
> > I think a $PYTHON -c "import sys; print(sys.version_info.major) is
> 
> $ python2.6 -c "import sys; print(sys.version_info.major)"
> Traceback (most recent call last):
>   File "<string>", line 1, in <module>
> AttributeError: 'tuple' object has no attribute 'major'
> 
grml :(

> > better here instead of the array access. I wait for Michaels opinion for
> > the rest of the patches in this series. If all seems fine I will resend a 
> > v4.
> 
> Maybe parsing "$PYTHON --version" is a better idea?
> 
Yea, I will falling back on the sed solution, which was my first
solution to check on the python version. Need to redirect stderr to
stdout for this because the version is printed out on stderr.

Thanks for you opinion and test with python 2.6.

- Alex

-- 
ptxdist mailing list
[email protected]

Reply via email to