Here's a proposal to get around having to remove install_requires, setup_requires, and extra_requires from setup.py files that import setuptools. In the distutils.eclass we can attempt to detect if a setup.py imports setuptools and if so install it this way: ${python} setup.py easy_install -Z --root=${D} . --no-deps "$@" || die This would be the default behavior but if there is a false-positive test for setuptools or for some other reason you want to disable it you would set a variable before the eclasses are inherited (NO_SETUPTOOLS_DISABLE or whatever) The following packages can have all the sed's/patches removed after the eclass is modified: pastescript-1.1 pastedeploy-1.1 turbocheetah-0.9.5 myghty-1.1 pudge/pudge-0.1.2 pudge-0.1.3 sqlobject-0.9.0 formencode-0.7.1 formencode-0.7 pyprotocols-1.0_pre2082 turbokid-1.0.1 beaker-0.6.3 turbogears-1.0.1 genshi-0.4.2 pylons-0.9.4.1 ruledispatch-0.5_pre2115 webhelpers-0.3
All the mentioned ebuilds had their sed's removed without having to change the distutils.eclass because setuptools in recent versions does not check for dependencies when you use --root= For the ebuilds that had extra_requires I bumped them to an -r1 version because of possible side-effects in bug# 183977