It appears that a big source of spurious warnings for this is when pkg_resources
is imported after other modules found in eggs. This can be resolved by changing
the insert_on() method to only check conflicts when the distribution isn't
already on sys.path. In other words, if you're re-adding something that's
already there, there's no point in getting the warning more than once. In
addition, wonlay's patch should help to fix some of the remaining cases.
That leaves handling of packages. It appears that the issue there is that the
setup.py for 'foolscap' is broken: its 'packages' keyword contains *paths*
rather than package names, which causes setuptools to generate a hosed
'top-level.txt', which should only contains top level package names. This is
causing attempts to check consistency of these nested packages, which then
breaks with stow. I'll add a warning for this, so that other people won't make
this mistake with their packages in future. |