mirror of
https://github.com/python/cpython.git
synced 2025-10-22 14:42:22 +00:00
Patch #1299675: Pass metadata in upload.
This commit is contained in:
parent
412ed3b8a7
commit
6d0c85a71c
1 changed files with 33 additions and 9 deletions
|
@ -70,17 +70,41 @@ class upload(Command):
|
||||||
spawn(("gpg", "--detach-sign", "-a", filename),
|
spawn(("gpg", "--detach-sign", "-a", filename),
|
||||||
dry_run=self.dry_run)
|
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()
|
content = open(filename,'rb').read()
|
||||||
|
meta = self.distribution.metadata
|
||||||
data = {
|
data = {
|
||||||
|
# action
|
||||||
':action': 'file_upload',
|
':action': 'file_upload',
|
||||||
'protcol_version': '1',
|
'protcol_version': '1',
|
||||||
'name':self.distribution.get_name(),
|
|
||||||
'version':self.distribution.get_version(),
|
# identify release
|
||||||
|
'name': meta.get_name(),
|
||||||
|
'version': meta.get_version(),
|
||||||
|
|
||||||
|
# file content
|
||||||
'content': (os.path.basename(filename),content),
|
'content': (os.path.basename(filename),content),
|
||||||
'filetype': command,
|
'filetype': command,
|
||||||
'pyversion': pyversion,
|
'pyversion': pyversion,
|
||||||
'md5_digest': md5(content).hexdigest(),
|
'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 = ''
|
comment = ''
|
||||||
if command == 'bdist_rpm':
|
if command == 'bdist_rpm':
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue