Bug 11181

Summary: Remove Python 2 as a host tool or needing to be built for our core images
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Joshua Lock <joshuagloe>
Component: coreAssignee: Alexander Kanavin <alex.kanavin>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: Medium+ CC: alex.kanavin, meta.mr.watcher, meta.watcher, richard.purdie, ross.burton
Version: 2.4   
Target Milestone: 2.4 M1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Yes (doc changes required)
Bug Depends on: 11180    
Bug Blocks:    

Description Joshua Lock 2017-03-17 15:24:59 UTC
We currently build two python runtimes, let's not.

We should remove python2 from the default images, ensure there aren't any native packages with python-native DEPENDS, ensure all python2 using recipes have python3 support and (if possible) move all python2 recipes out of OE-Core.
Comment 1 Ross Burton 2017-04-24 10:36:41 UTC
I suspect we'll need it as a host tool for some time for the odd Python script used in recipes, but I'd like to think that we can stop building python2(-native).
Comment 2 Alexander Kanavin 2017-04-27 12:34:52 UTC
This year it's not realistic. We can continue to reduce runtime py2 dependencies, and there'll be only a few holdouts, but py2 will be required at build time for quite some time still (and py2-native will be eliminated sooner than host py2).

I'll post a 'round 2' py2 reduction patchset sometime next week, and I guess it becomes a once-a-year activity :)
Comment 3 Alexander Kanavin 2017-04-27 14:30:26 UTC
Patchset posted for review:
http://lists.openembedded.org/pipermail/openembedded-core/2017-April/136138.html

From the cover letter, this is the sitation now:

There are still a few py2 holdouts:
- python-numpy (needed by a few recipes in meta-oe, shares code with python3-numpy)
- python-nose (dependency of python-numpy)
- python-scons (work to port it to py3 is ongoing now)
- python-setuptools (dependency of python-scons)
- bmap-tools
- ltp
- perf
- asciidoc

And a couple of packagegroups list python 2 as well:
- packagegroup-self-hosted
- packagegroup-core-lsb

Let's revisit the situation with the above in a year or so.