How to use the distutils2.metadata.Metadata function in Distutils2

To help you get started, we’ve selected a few Distutils2 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nix-community / pypi2nix / python2nix / utils.py View on Github external
def get_metadata(egg_rel):
    """ fetch_metadata

    egg_rel.fetch_metadata() should do this, but seems to be broken"""
    egg_rel.download()
    tmp_path = egg_rel.unpack()
    sub_dir = os.listdir(tmp_path)[0]
    return Metadata(os.path.join(tmp_path, sub_dir, "PKG-INFO"))
github nix-community / pypi2nix / plone2nix.py View on Github external
def get_metadata(egg_rel):
    """ fetch_metadata

    egg_rel.fetch_metadata() should do this, but seems to be broken"""
    egg_rel.download()
    tmp_path = egg_rel.unpack()
    sub_dir = os.listdir(tmp_path)[0]
    return Metadata(os.path.join(tmp_path, sub_dir, "PKG-INFO"))