Some scripts (called not necessarily during installation) etc. need to be able to portably and reliably get: - Active version of Python - Active version of Python 2 - Active version of Python 3 Currently it would be achievable by checking /etc/env.d/python/config and calling `readlink /usr/bin/python2` / `readlink /usr/bin/python3`, but scripts and python.eclass shouldn't rely on knowledge about such internals of app-admin/eselect-python, so I suggest that new versions of app-admin/eselect-python install a helper script, gentoo-python-config, which will support at least the following options: --help --print-active-python-version --print-active-python2-version --print-active-python3-version Optionally also: --set-active-python-version --set-active-python2-version --set-active-python3-version (gentoo-python-config would be wrapper for `eselect python` and readlink.) Then a script or a function in python.eclass could contain e.g.: python2_version="$(/usr/bin/gentoo-python-config --print-active-python2-version)"
After some thinking about it, I think that it will be better to add new options to some commands of `eselect python`. Examples: eselect python show --python2 eselect python show --python3 eselect python set --python2 ${value} eselect python set --python3 ${value}
Fixed in r256.
Fixed in app-admin/eselect-python-20091230.