Suppose that I am writing an ebuild for a python package that needs elementtree. It therefore needs to depend on python[xml] for every slot of python - so if I use python-distutils-ng.eclass, I need to explicitly write something like RDEPEND="python_targets_python2_5? ( dev-lang/python:2.5[xml] ) python_targets_python2_6? ( dev-lang/python:2.6[xml] ) python_targets_python2_7? ( dev-lang/python:2.7[xml] ) python_targets_python3_1? ( dev-lang/python:3.1[xml] ) python_targets_python3_2? ( dev-lang/python:3.2[xml] )" which really is terribly ugly. I suggest that python-distutils-ng.eclass add something like the PYTHON_USE_WITH/PYTHON_USE_WITH_OPT mechanism in python.eclass to automate such dependency declarations on python implementations.
Created attachment 324868 [details, diff] python-distutils-ng.eclass.patch discussed on dev-ml If no one comes up with a better idea I would like to apply it.
(In reply to comment #1) That should work.
Created attachment 325020 [details, diff] python-distutils-ng.eclass.patch after some discussion it seems the python herd would like to drop jython and pypy variables, so we have only one and handle the flag-difference inside the implementations via fake-flags
+ 26 Sep 2012; Julian Ospald <hasufell@gentoo.org> python-distutils-ng.eclass: + add PYTHON_USE wrt #426768 # @ECLASS-VARIABLE: PYTHON_USE # @DEFAULT_UNSET # @DESCRIPTION: # Comma-separated list of useflags needed for all(!) allowed # implementations. This is directly substituted into one or more of # dev-lang/python[${PYTHON_USE}], dev-python/pypy[${PYTHON_USE}] and # dev-java/jython[${PYTHON_USE}]. # @CODE # example 1: PYTHON_USE="xml,sqlite" # example 2: PYTHON_USE="xml?,threads?,-foo" # @CODE