On Wednesday, 15 May 2019 13.45.55 WEST Jean-Marc Lasgouttes wrote:
> Le 15/05/2019 à 14:29, José Abílio Matos a écrit :
> > On Tuesday, 14 May 2019 19.17.56 WEST Jean-Marc Lasgouttes wrote:
> >> On my self-build master LyX on windows 10, I get the error below when
> >> reconfiguring. Python is 3.6.
> >> 
> >> What is that?
> >> 
> >> JMarc
> > 
> > Based on this I would like to suggest before 2.4 to modify the current
> > python detection logic.
> 
> You mean that I was a bit too brave when deciding to install only python3?

Nope. :-)

As I have told you I had some of the fedora packages (from the equivalent of a 
ppa) running with python 3 only.

Some of the python3 problems found later did not happen for me because I did 
not execute that code (like some converters and equivalent).
 
> > Instead of using the first version we find, I would suggest to try first
> > to
> > detect python 3 and only then if it is not detected to search for python
> > 2.
> 
> Currently, we have a baroque list which is:
> 
> [python python2 python3 python3.3 python3.2 python3.1 python3.0
> python2.7 dnl
>   python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0])
> 
> Does it really correspond to some relevant ordering? What would you
> suggest instead? Move "python2" just before python2.7? And put "poython"
> at the end?

Not only that but it is plainly wrong. We support python 2 but just for python 
2.7. Our code to be compatible with python 3 requires python 2.7 at least.
 
> I guess we can get rid of most of the pythonX.y values, or do they make
> sense in any way?

We should get rid of those and only test python2 and python3, not even just 
python.

That comes from https://www.python.org/dev/peps/pep-0394/
(Note that this pep is originally from 2011 and so it should be implemented in 
all the systems that we support)

First the convention:
python2 will refer to some version of Python 2.x.
python3 will refer to some version of Python 3.x.


Notice that at the begin it recommends:
* Unix-like software distributions (including systems like Mac OS X and 
Cygwin) should install the python2 command into the default path whenever a 
version of the Python 2 interpreter is installed, and the same for python3 and 
the Python 3 interpreter.
* When invoked, python2 should run some version of the Python 2 interpreter, 
and python3 should run some version of the Python 3 interpreter.


On my system I have:
$ ls -l /usr/bin/python
lrwxrwxrwx. 1 root root 7 Apr 30 16:55 /usr/bin/python -> python2
$ ls -l /usr/bin/python2
lrwxrwxrwx. 1 root root 9 Apr 30 16:55 /usr/bin/python2 -> python2.7
$ ls -l /usr/bin/python3
lrwxrwxrwx. 1 root root 9 May 11 01:41 /usr/bin/python3 -> python3.7


So all the systems that we support should have one of python2 or python3.

> JMarc
> 
> > The advantage of this approach is that it works for places that only have
> > python 2 installed.
> 
> But how is this related to the problem I had?

I suspect that Jürgen has python3 installed. If when developing by default 
python3 was active Jürgen would catch this issue immediately and so no problem 
for you.

> JMarc


-- 
José Abílio


Reply via email to