diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2006-01-08 10:48:54 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2006-01-08 10:48:54 (GMT) |
commit | 6d0c85a71c0d12fd45693ca37b66959a33e9b941 (patch) | |
tree | d57eb0162c83d1712610b831233a2fe36cd9b5bd /Lib/distutils/command | |
parent | 412ed3b8a7388da4850d2a832679fe21804a1591 (diff) | |
download | cpython-6d0c85a71c0d12fd45693ca37b66959a33e9b941.zip cpython-6d0c85a71c0d12fd45693ca37b66959a33e9b941.tar.gz cpython-6d0c85a71c0d12fd45693ca37b66959a33e9b941.tar.bz2 |
Patch #1299675: Pass metadata in upload.
Diffstat (limited to 'Lib/distutils/command')
-rw-r--r-- | Lib/distutils/command/upload.py | 42 |
1 files changed, 33 insertions, 9 deletions
diff --git a/Lib/distutils/command/upload.py b/Lib/distutils/command/upload.py index 3b5a0fc..62767a3 100644 --- a/Lib/distutils/command/upload.py +++ b/Lib/distutils/command/upload.py @@ -70,17 +70,41 @@ class upload(Command): spawn(("gpg", "--detach-sign", "-a", filename), dry_run=self.dry_run) - # Fill in the data + # Fill in the data - send all the meta-data in case we need to + # register a new release content = open(filename,'rb').read() + meta = self.distribution.metadata data = { - ':action':'file_upload', - 'protcol_version':'1', - 'name':self.distribution.get_name(), - 'version':self.distribution.get_version(), - 'content':(os.path.basename(filename),content), - 'filetype':command, - 'pyversion':pyversion, - 'md5_digest':md5(content).hexdigest(), + # action + ':action': 'file_upload', + 'protcol_version': '1', + + # identify release + 'name': meta.get_name(), + 'version': meta.get_version(), + + # file content + 'content': (os.path.basename(filename),content), + 'filetype': command, + 'pyversion': pyversion, + 'md5_digest': md5(content).hexdigest(), + + # additional meta-data + 'metadata_version' : '1.0', + 'summary': meta.get_description(), + 'home_page': meta.get_url(), + 'author': meta.get_contact(), + 'author_email': meta.get_contact_email(), + 'license': meta.get_licence(), + 'description': meta.get_long_description(), + 'keywords': meta.get_keywords(), + 'platform': meta.get_platforms(), + 'classifiers': meta.get_classifiers(), + 'download_url': meta.get_download_url(), + # PEP 314 + 'provides': meta.get_provides(), + 'requires': meta.get_requires(), + 'obsoletes': meta.get_obsoletes(), } comment = '' if command == 'bdist_rpm': |