python2.6 setup.py build -b build-2.6 --without-threading Traceback (most recent call last): File "setup.py", line 14, in <module> pkg_resources.require("setuptools>=0.6c5") File "/usr/lib64/python2.6/site-packages/pkg_resources.py", line 621, in require needed = self.resolve(parse_requirements(requirements)) File "/usr/lib64/python2.6/site-packages/pkg_resources.py", line 519, in resolve raise DistributionNotFound(req) # XXX put more info here pkg_resources.DistributionNotFound: setuptools>=0.6c5 * ERROR: dev-python/lxml-2.2.2 failed: * Building failed with Python 2.6 in building() function * * Call stack: * ebuild.sh, line 55: Called src_compile * environment, line 3527: Called distutils_src_compile '--without-threading' * environment, line 894: Called python_execute_function 'building' '--without-threading' * environment, line 3100: Called die * The specific snippet of code: * die "${failure_message}"; It seems that lxml requires >=setuptools-0.6c5 which I assume in Gentoo is >=setuptools-0.6.6 which is keyword masked. It was my understanding that a package couldn't be unmasked in Gentoo without all of its dependancies being unmasked as well. Solution, keyword mask this version or stabilize setuptools ~0.6.6.
emerging dev-python/setuptools-0.6.6 and then dev-python/lxml-2.2.2 resolved the problem for me.
0.6c5 means 0.6_rc5. dev-python/setuptools-0.6.6 is already stable for some time.