dev-libs/libdnet-1.12 was built with the following: USE="-ipv6 -python -static-libs -test" PYTHON_TARGETS="python2_7 -python2_6" # cat /var/db/pkg/dev-libs/libdnet-1.12/RDEPEND >=dev-lang/python-2.7.5-r2:2.7 dev-python/python-exec:0/0=[python_targets_python2_7(-),-python_single_target_python2_6(-),-python_single_target_python2_7(-)] s/distutils/python-single/ in the ebuild seems to fix the issue, although I have no idea whether that's the right approach (see bug #482146).
I made the included $PYTHON_DEPS depend on whether USE=python is set.
Not fixed: > cat /var/db/pkg/dev-libs/libdnet-1.12/RDEPEND >=dev-lang/python-2.7.5-r2:2.7 dev-lang/python-exec:0/0=[python_targets_python2_7(-),-python_single_target_python2_6(-),-python_single_target_python2_7(-)] From /usr/portage/eclass/distutils-r1.eclass: # Please note that distutils-r1 sets RDEPEND and DEPEND unconditionally # for you.
You're looking for DISTUTILS_OPTIONAL [1]. [1]:http://wiki.gentoo.org/wiki/Python/distutils-r1#DISTUTILS_OPTIONAL
Putting DISTUTILS_OPTIONAL=1 before the inherit line indeed fixes the issue.
(In reply to Maxim Kammerer from comment #4) > Putting DISTUTILS_OPTIONAL=1 before the inherit line indeed fixes the issue. Added.