-
Committer:
Yasushi SHOJI
-
Date:
2015-10-03 08:24:48 UTC
-
Revision ID:
yashi@atmark-techno.com-20151003082448-6a3p0hjx0vg9kv5w
Handle multiple supported-versions returned by pyversions and py3versions
On Wily with python3-minimal 3.4.3-4ubuntu1,
/usr/share/python3/debian_defaults has multiple version listed in
supported-versions.
supported-versions = python3.4, python3.5
Those versions return when `py3version -i` is run.
$ py3versions -i
python3.4 python3.5
pyversions, with /usr/share/python/debian_defaults, behaves the same.
`pyversions -i` and `py3version -i` is used in snapcraft to generate
PYTHONPATH in Python3ProjectPlugin::python_version(), but due to the
multiple return values separated by a space, it generates the
following PYTHONPATH:
"....spongeshaker/install/usr/lib/python3.4 python3.5/dist-packages"
and dies with "export: python3.5/dist-packages: bad variable name".
To fix this, just take the first entry of the list. It's usually the
oldest supported version available and safer to rely on.