[LEDE-DEV] Tools prerequisites: should python2 requirement be upgraded to python3?
hannu.nyman at iki.fi
Sat Oct 21 01:04:38 PDT 2017
I upgraded my buildhost to new Ubuntu 17.10 and noticed that Ubuntu has
dropped python 2.7 from the packages installed by default, and only python3
is installed. There is no symlink for "python", so LEDE prerequisite check fails.
LEDE prerequisite check looks for Python2:
$(eval $(call SetupHostCommand,python,Please install Python 2.x, \
python2.7 -V 2>&1 | grep Python, \
python2 -V 2>&1 | grep Python, \
python -V 2>&1 | grep Python))
Ubuntu 17.10 does not provide a symlink for plain "python", likely because
they want to keep users aware that python3 is the version in use. So the
prerequisite check fails. That will hurt users with build systems that are
python3-only by default.
Installing the old python 2.7 naturally helped, but I started to wonder if
there is a really good reason why LEDE buildhost does not use python3 and
python2 is required?
rules.mk seems to define python as PYTHON:=python
I wonder if that could be enhanced to use python3 if available.
Of the build tools, "scons" seems to use/check for python2 (in
tools/scons/files/pywrap.sh ), but based on internet resources, scons itself
works ok also with python3.
I have not tested how well the build would go with python symlinked to
python3, but just wanted raise the issue that some popular Linux distros are
moving towards python3 now.
Python2 has EOL set for 2020, so there is still time to move on, but we might
be ahead of the deadline.
More information about the Lede-dev