bug-pyconfigure
[Top][All Lists]
Advanced

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

[Bug-pyconfigure] pyconfigure fails to detect python3 on debian


From: Florian Dold
Subject: [Bug-pyconfigure] pyconfigure fails to detect python3 on debian
Date: Fri, 8 Apr 2016 17:44:26 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1

Hi,

I'm looks like pyconfigures has some difficulties detecting python3 on
debian when python2 is installed as "python" in $PATH.

I've tried with pyconfigure git 5d76532 and pyconfigure-0.2.2.

With PC_INIT([3.4]) and the following Python versions on $PATH:

$ python --version
Python 2.7.11+
$ python3 --version
Python 3.5.1+

pyconfigure outputs:
checking if Python >= '3.4'... no

Looking at configure.log, it seems like pyconfigure is finding the
python2 interpreter, for which the version test fails.  Other python
interpreters are not tried after the first one fails.

Setting $PYTHON manually works, but it would be great if pyconfigure
could detect python3 automatically.

Cheers,
Florian



configure:1751: checking for python
configure:1769: found /usr/bin/python
configure:1781: result: /usr/bin/python
configure:1796: checking if Python >= '3.4'
configure:1833: chmod +x conftest.py && cp conftest.py conftest >&5
configure:1833: $? = 0
configure:1833: ./conftest
configure:1833: $? = 1
configure: program exited with status 1
configure: failed program was:
| #!/usr/bin/python
| import sys
|
| if __name__ == '__main__':
|     # split strings by '.' and convert to numeric.  Append some zeros
|     # because we need at least 4 digits for the hex conversion.
|     # map returns an iterator in Python 3.0 and a list in 2.x
|     reqver = list(map(int, '3.4'.split('.'))) + [0, 0, 0]
|     reqverhex = 0
|     # xrange is not present in Python 3.0 and range returns an iterator
|     for i in list(range(4)):
|         reqverhex = (reqverhex << 8) + reqver[i]
|     # the final 8 bits are "0xf0" for final versions, which are all
|     # we'll test against, since it's doubtful that a released software
|     # will depend on an alpha- or beta-state Python.
|     reqverhex += 0xf0
|     if sys.hexversion >= reqverhex:
|         sys.exit()
|     else:
|         sys.exit(1)
|
configure:1849: result: no
configure:1852: error: in `/home/test/bank':
configure:1854: error: No compatible Python interpreter found. If you're
sure that you have one, try setting the PYTHON environment variable to
the location of the interpreter.
See `config.log' for more details



reply via email to

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