[LEDE-DEV] Tools prerequisites: should python2 requirement be upgraded to python3?

txt.file txt.file at txtfile.eu
Sat Oct 21 18:58:00 PDT 2017


In my humble opinion moving to python3 is a good idea. Debian has also
python3 as default since stretch. The bigger question is what will break
by switching to python3.

Hannu Nyman:
> 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:
> 
> https://github.com/lede-project/source/blob/master/include/prereq-build.mk#L141
> 
> 
>  $(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.
> 
> 
> 
> _______________________________________________
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20171022/b51df79f/attachment.sig>


More information about the Lede-dev mailing list