Hi, everyone. This one goes to gentoo-dev since it's a potentially wider idea and I'd like to get other developers opinion on.
As you most likely already know, distutils-r1 allows ebuilds to define
sub-phase functions like:
python_compile() {
# commands which will be run for each impl
do_something_magical
}
Often, ebuilds do not want to override the sub-phases completely
but instead call the default implementation:
python_install_all() {
use doc && local HTML_DOCS=( doc/html/. )
distutils-r1_python_install_all
}
So the behavior is quite similar to the regular phase functions.
However, the function names ended up quite verbose.
To make this more friendly, I would likely to locally introduce
'edefault' function in the eclass (name can change). The function would
-- similarly to 'default' in regular phase functions -- call
the default code for the sub-phase.
For example, the above would change to:
python_install_all() {
use doc && local HTML_DOCS=( doc/html/. )
edefault
}
I will send in reply a patch adding the described magic to the eclass,
and a second one showing how an example ebuild can be changed
(dev-python/setuptools).
What are your thoughts?
--
Best regards,
Michał Górny
signature.asc
Description: PGP signature
