[yocto] Setting default system python version
Paul Eggleton
paul.eggleton at linux.intel.com
Tue May 27 02:41:37 PDT 2014
Hi Diego,
On Friday 23 May 2014 12:45:20 Diego Sueiro wrote:
> Now python3-distutils returns the following on do_compile:
>
> Log data follows:
> | DEBUG: Executing shell function do_compile
> |
> | Traceback (most recent call last):
> | File "setup.py", line 45, in <module>
> |
> | exec(init_file.read(), d)
> |
> | File "<string>", line 8, in <module>
> | File
>
> "/<snip>/tmp/work/cortexa7hf-vfp-vfpv4-neon-poky-linux-gnueabi/python3-distr
> ibute/0.6.32-ml5/distribute-0.6.32/build/src/setuptools/__init__.py", line
> 2, in <module>
>
> | from setuptools.extension import Extension, Library
> |
> | File
>
> "/<snip>/tmp/work/cortexa7hf-vfp-vfpv4-neon-poky-linux-gnueabi/python3-distr
> ibute/0.6.32-ml5/distribute-0.6.32/build/src/setuptools/extension.py", line
> 5, in <module>
>
> | from setuptools.dist import _get_unpatched
> |
> | File
>
> "/<snip>/tmp/work/cortexa7hf-vfp-vfpv4-neon-poky-linux-gnueabi/python3-distr
> ibute/0.6.32-ml5/distribute-0.6.32/build/src/setuptools/dist.py", line 103
>
> | except ValueError, e:
> | ^
> |
> | SyntaxError: invalid syntax
> | ERROR: python3 setup.py build_ext execution failed.
> | WARNING: exit code 1 from a shell command.
>
> Change the python3-distutils recipe to "inherit distutils" instead "inherit
> distutils3" did the trick.
This is not the right thing to do though. We have these separate classes
precisely to separate python 3 and python 2, and distutils.bbclass is for
python 2. In regards to your earlier question, I don't think that we do have a
central switch for selecting which python version should be included in your
image - if I'm not mistaken the way our classes have been written, a single
python module recipe either supports python 2 or 3, so you'd just install the
version 3 recipes instead of version 2.
Khem, any ideas what could be going wrong here?
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
More information about the yocto
mailing list