On Sat, Oct 26, 2013 at 10:18 PM, Walter Dnes <waltd...@waltdnes.org> wrote:
> On Sat, Oct 26, 2013 at 09:30:57PM -0400, Mike Gilbert wrote
>
>> The (non-)relationship between eselect python and PYTHON_TARGETS is
>> something that would be nice to resolve, but I don't know how to do
>> it. PYTHON_SINGLE_TARGET will probably cause problems if/when packages
>> start supporting python3 only.
>
>   What I find interesting/annoying is that my make.conf has to have 3
> lines...
>
> PYTHON_SINGLE_TARGET="python2_7"
> PYTHON_TARGETS="python2_7"
> USE_PYTHON="2.7"
>
> ...as if it didn't hear me the first time.  How difficult would it be to
> set up an eclass to tell portage that...
>
> if PYTHON_SINGLE_TARGET="pythonX_Y"
>
> PYTHON_TARGETS defaults to "${PYTHON_SINGLE_TARGET}"
>
> USE_PYTHON defaults to "${PYTHON_SINGLE_TARGET/_/.}"
>
>   Over-ride the default if explicitly listed.  Out of sheer curiousity,
> what circumstances are there where ordinary users would need differing
> values for these 3 items?
>

PYTHON_TARGETS and PYTHON_SINGLE_TARGET are used indirectly by
python-r1.eclass. However, both are both expanded into use flags and
used in dependency calculations before any ebuild/eclass code is
invoked. So, we cannot manipulate them in an eclass or ebuild.

PYTHON_TARGETS may contain multiple python versions and is used for
most python packages in the tree. It allows the same package to be
installed for multiple python versions simultaneously.

PYTHON_SINGLE_TARGET should only contain one python version; it is
used for packages which cannot (easily) be made to support multiple
versions of python simultaneously. So we have to pick one.

USE_PYTHON is a legacy setting used by the old python.eclass and is
not used to control any use flags or dependencies. Ideally, we could
default this to PYTHON_TARGETS, but due to the way use-expanded
variables work this is not possible. This variable will go away once
python.eclass is removed from the portage tree.

Reply via email to