Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 487890 - eclasses python-r1 and python-single-r1 should not conflict with python-any-r1
Summary: eclasses python-r1 and python-single-r1 should not conflict with python-any-r1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Python Gentoo Team
URL: https://github.com/CMoH/gnome15-overlay
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-13 14:52 UTC by Ciprian Ciubotariu
Modified: 2013-10-13 19:33 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ciprian Ciubotariu 2013-10-13 14:52:21 UTC
For my gnome15 overlay, package app-misc/gnome15 requires both functions from python-r1/python-single-r1 and that of python-any-r1:

- gnome15 only works with python2.x, so the shebangs have to be replaced etc
- use python2 during src_configure regardless of the currently eselected python version

From a ebuild developer perspective, the functions of these eclasses are orthogonal, and they should not be in conflict: one is about which python is used during the configure/compile phase, the other refers which python is used by the installed scripts.

From an eclass developer perspective, commenting out the conflict check in each of the eclasses allows my gnome15-0.9.6-r4 ebuild to be built, and also functions correctly.

Reproducible: Always
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-10-13 16:13:20 UTC
Could you link the current/draft ebuild, please?

To be honest, in most cases only one of the eclasses is enough. If you use python-single-r1, the selected Python version should be used for build-time stuff as well -- there's no point in loading two different Python versions. Similarly, for python-r1 you use the 'best' impl to avoid loading unused otherwise Python.

IOW, python-single-r1 should 'just work'. For python-r1, you use 'python_export_best' followed by 'python_wrapper_setup', e.g. in src_configure().

Does that solve your issues?
Comment 2 Ciprian Ciubotariu 2013-10-13 19:33:45 UTC
For reproducing the problem, I recommend cloning the overlay repository off github (because of dependencies and new packages). Follow the readme for unmasking some packages.

https://github.com/CMoH/gnome15-overlay

So far I've tested an ebuild with just python-single-r1, and it seems to not 'just work'. The problem is that I had overriden pkg_setup() for some extra-work regarding the kernel, and I didn't call pyhton-single-r1_pkg_setup(). Adding the call made python-any-r1 unnecessary.

But python-r1 does not have a similar pkg_setup function, and the function python_export_best (as mentioned in your reply) did not seem appealing for the job of selecting the build-time python version.

Perhaps you could help others contributing ebuilds by clearing that up in the function's documentation, or on the page at http://www.gentoo.org/proj/en/Python/python-r1/dev-guide.xml

Thanks