Bug 5725

Summary: Add QA check for installing Python Eggs
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Ross Burton <ross.burton>
Component: coreAssignee: Loc Nguyen <loc.nguyen.wt>
Status: RESOLVED OBSOLETE QA Contact:
Severity: enhancement    
Priority: Medium CC: akuster808, loc.nguyen.wt, meta.mr.watcher, meta.watcher, mhalstead, randy.macleod, richard.purdie, tim.orling, tvgamblin
Version: 1.6   
Target Milestone: 4.99   
Hardware: All   
OS: Multiple   
Whiteboard: NEWCOMER
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
proposed patch none

Description Ross Burton 2014-01-14 17:56:55 UTC
Packages that install Python modules shouldn't be installing Eggs, as distro-managed modules should be "bare".  It shouldn't be hard to detect this happening in a sanity test, and warning the user.
Comment 1 akuster 2022-06-02 14:51:37 UTC
Since we moved to wheels, is this still needed?
Comment 2 Ross Burton 2022-06-04 17:47:17 UTC
Might be worth having the test still, to catch people installing with legacy stuff.
Comment 3 Loc Nguyen 2023-04-05 03:07:15 UTC
Dear all,
I'm a newcomer, I have submitted a patch following instruction at: http://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded
Please help to review.
Comment 4 Loc Nguyen 2023-04-05 03:07:55 UTC
Created attachment 4944 [details]
proposed patch
Comment 5 Ross Burton 2023-04-18 14:16:51 UTC
I can't see the patch on the list, did you submit it to openembedded-core@lists.openembedded.org?

I'm not sure that patch will work, as it depends on the recipe explicitly RDEPENDing on python3-eggs.  A recipe which is installing an egg inadvertently won't do that.
Comment 6 Loc Nguyen 2023-04-25 04:18:19 UTC
Hi Mr. Ross Burton

> I'm not sure that patch will work,(In reply to Ross Burton from comment #5)
> I can't see the patch on the list, did you submit it to
> openembedded-core@lists.openembedded.org?
I've submitted to openembedded-core@lists.openembedded.org.
You can search for the mail subject: setuptools3: adding sanity check to detect python-eggs install

> I'm not sure that patch will work, as it depends on the recipe explicitly
> RDEPENDing on python3-eggs.  A recipe which is installing an egg
> inadvertently won't do that.
I'm sorry, but can you give me an example. My understanding is:
- Each python module will be managed by a separate recipe. 
- To install python-eggs, user will specify IMAGE_INSTALL += ' python-eggs', 
- or it will be installed when RDEPENDing of a recipe have 'python-eggs'
Comment 7 Ross Burton 2023-04-25 09:45:32 UTC
> I'm sorry, but can you give me an example. My understanding is:
> - Each python module will be managed by a separate recipe. 
> - To install python-eggs, user will specify IMAGE_INSTALL += ' python-eggs', 
> - or it will be installed when RDEPENDing of a recipe have 'python-eggs'

That's not right.

A 'python egg' is .zip file which contains a module (where as a bare module is just a directory of files). There is no file called 'python-eggs'.

However since this bug was created the Python world has moved on a lot and I'm not convinced it's worth checking for eggs anymore.  They were used by easy_install which has been entirely replaced by pip.

Sorry, but I think I'll close this: the check will be obsolete.