Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (Pdb) print(indexer.query("def normalize_dist_name(name: str, version: str) -> str:"))
- return True
- def make_metadata(module, ini_info):
- md_dict = {'name': module.name, 'provides': [module.name]}
- md_dict.update(get_info_from_module(module, ini_info.dynamic_metadata))
- md_dict.update(ini_info.metadata)
- return Metadata(md_dict)
- def normalize_dist_name(name: str, version: str) -> str:
- """Normalizes a name and a PEP 440 version
- The resulting string is valid as dist-info folder name
- and as first part of a wheel filename
- See https://packaging.python.org/specifications/binary-distribution-format/#escaping-and-unicode
- """
- normalized_name = re.sub(r'[-_.]+', '_', name, flags=re.UNICODE).lower()
- assert check_version(version) == version
- assert '-' not in version, 'Normalized versions can’t have dashes'
- return '{}-{}'.format(normalized_name, version)
- def dist_info_name(distribution, version):
- """Get the correct name of the .dist-info folder"""
- return normalize_dist_name(distribution, version) + '.dist-info'
Advertisement
Add Comment
Please, Sign In to add comment