Commit Graph

1 Commits

Author SHA1 Message Date
Lukas Bulwahn 6ddc0cc518 python3: make python point to python3 (resolves #570)
This commit is just a copy of the patch that Dmitry Rozhkov
submitted to openembedded-core, but it was rejected there [1].

If only python3 is installed on an image nothing provides
/usr/bin/python even though many scripts compatible with
both python2 and python3 just state `#!/usr/bin/env python`
in their shebang line.

Make python and python3 recipes provide alternatives for
/usr/bin/python and /usr/bin/python-config. By default
python2 has higher priority over python3.

In meta-ros, we need this behaviour for ROS_USE_PYTHON3 = "yes"
because ROS packages are always written to be python2 and python3
compatible.

[1] https://patchwork.openembedded.org/patch/139143/

Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
2018-02-22 06:29:36 +01:00