• Marc Abramowitz's avatar
    DistributionNotFound: Show requirers · 2283fc21
    Marc Abramowitz authored
    It is very helpful to know who required the missing package. E.g.:
    
        pkg_resources.DistributionNotFound: The 'colorama>=0.3.1' distribution was not found and is required by smlib.log.
    
    Note that there was a comment: "unfortunately, zc.buildout uses a str(err) to
    get the name of the distribution here..", but I did a search in the `buildout`
    code and I think that is no longer true, so I think that we're free to make the
    exception message more helpful without risk of breaking buildout:
    
        # In clone from https://github.com/buildout/buildout
        $ ag DistributionNotFound
        src/zc/buildout/buildout.py
        686:        except (ImportError, pkg_resources.DistributionNotFound):
    
        $ pip install --download=. --no-install zc.buildout
        ...
          Saved ./zc.buildout-2.3.1.tar.gz
        ...
        $ tar xf zc.buildout-2.3.1.tar.gz
        $ ag DistributionNotFound zc.buildout-2.3.1
        zc.buildout-2.3.1/src/zc/buildout/buildout.py
        686:        except (ImportError, pkg_resources.DistributionNotFound):
    
    --HG--
    branch : DistributionNotFound_list_requirers
    2283fc21
__init__.py 103 KB