summaryrefslogtreecommitdiff
path: root/distutils2/util.py
diff options
context:
space:
mode:
authorKelsey Hightower <kelsey.hightower@gmail.com>2011-02-10 00:14:01 -0500
committerKelsey Hightower <kelsey.hightower@gmail.com>2011-02-10 00:14:01 -0500
commitf3ef7b11a3a0aa0f24ba464797558f4e594c73a1 (patch)
tree8c60512a5ccb55928214644550c54b9cc1d4083f /distutils2/util.py
parent18e1f92438495a791b1e65ed8d3b3fb7c88a39ff (diff)
downloaddisutils2-f3ef7b11a3a0aa0f24ba464797558f4e594c73a1.tar.gz
Changing the metadata.version API and relocating the metadata_to_dict function.
A new function, get_metadata_version, replaces the metadata.version attribute as the preferred method of retrieving the metadata version. The metadata_to_dict function has been relocated from distutils2.util to distutils2.metadata to help improve organization.
Diffstat (limited to 'distutils2/util.py')
-rw-r--r--distutils2/util.py35
1 files changed, 0 insertions, 35 deletions
diff --git a/distutils2/util.py b/distutils2/util.py
index 8006213..53a3060 100644
--- a/distutils2/util.py
+++ b/distutils2/util.py
@@ -924,41 +924,6 @@ def read_pypirc(repository=DEFAULT_REPOSITORY, realm=DEFAULT_REALM):
return {}
-def metadata_to_dict(meta):
- """XXX might want to move it to the Metadata class."""
- data = {
- 'metadata_version': meta.version,
- 'name': meta['Name'],
- 'version': meta['Version'],
- 'summary': meta['Summary'],
- 'home_page': meta['Home-page'],
- 'author': meta['Author'],
- 'author_email': meta['Author-email'],
- 'license': meta['License'],
- 'description': meta['Description'],
- 'keywords': meta['Keywords'],
- 'platform': meta['Platform'],
- 'classifier': meta['Classifier'],
- 'download_url': meta['Download-URL'],
- }
-
- if meta.version == '1.2':
- data['requires_dist'] = meta['Requires-Dist']
- data['requires_python'] = meta['Requires-Python']
- data['requires_external'] = meta['Requires-External']
- data['provides_dist'] = meta['Provides-Dist']
- data['obsoletes_dist'] = meta['Obsoletes-Dist']
- data['project_url'] = [','.join(url) for url in
- meta['Project-URL']]
-
- elif meta.version == '1.1':
- data['provides'] = meta['Provides']
- data['requires'] = meta['Requires']
- data['obsoletes'] = meta['Obsoletes']
-
- return data
-
-
# utility functions for 2to3 support
def run_2to3(files, doctests_only=False, fixer_names=None,