As noted on IRC, python_wrapper_setup currently gets PYTHON_CONFIG to link to it, which forces unconditional build-time dep on Python. Maybe we could get away with just linking to pythonX.Y-config (without ABIFLAGS) and avoid the dependency. That is, if anybody cares not to have Python at build time for a few corner case packages.
Patch sent for review.
commit 6a5909861804d1c32cf5b850c4b143c02009f661 Author: Michał Górny <mgorny@gentoo.org> AuthorDate: Fri Apr 21 16:03:23 2017 Commit: Michał Górny <mgorny@gentoo.org> CommitDate: Tue Apr 25 19:57:56 2017 python-utils-r1.eclass: python_wrapper_setup, do not query PYTHON_CONFIG Use plain 'pythonX.Y-config' executable name in the python-config wrapper instead of querying the complete PYTHON_CONFIG path from python_export. Constructing full PYTHON_CONFIG path requires querying ABIFLAGS which requires the Python interpreter to be installed, which in turn unnecessarily forces every ebuild using the eclass to carry a build-time dependency on the Python interpreter. All current versions of Python correctly install 'pythonX.Y-config' symlink that points to the correct ABI-suffixed binary. It is therefore unnecessary to use the full path.