• Marius Gedminas's avatar
    Don't assume pkg_resources is a module. · e4101a23
    Marius Gedminas authored
    In setuptools < 8.3 pkg_resources.py was a module, so
        import pkg_resources
    would print something like
    Starting from setuptools 8.3 pkg_resources became a package, so the
    above code prints
    which means a single os.path.dirname() is no longer sufficient to find
    the location of the .egg file/directory.
    I'm pretty sure 'setuptools' itself was always a package, so use two
    os.path.dirname()s on setuptools.__file__ to find the .egg location more
    reliably with both old and new setuptools versions.
    Fixes https://github.com/buildout/buildout/issues/227
dev.py 2.59 KB