Skip to content

Commit

Permalink
bpo-35186: Remove "built with" comment in setup.py upload (pythonGH-1…
Browse files Browse the repository at this point in the history
…0414)

platform.dist() is deprecated and slated for removal in Python 3.8. The
upload command itself should also not be used to upload to PyPI, but
while it continues to exist it should not use deprecated functions.
  • Loading branch information
pganssle authored and encukou committed Dec 17, 2018
1 parent 2dfe351 commit 4e80f5c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
10 changes: 2 additions & 8 deletions Lib/distutils/command/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,8 @@ def upload_file(self, command, pyversion, filename):
'requires': meta.get_requires(),
'obsoletes': meta.get_obsoletes(),
}
comment = ''
if command == 'bdist_rpm':
dist, version, id = platform.dist()
if dist:
comment = 'built for %s %s' % (dist, version)
elif command == 'bdist_dumb':
comment = 'built for %s' % platform.platform(terse=1)
data['comment'] = comment

data['comment'] = ''

if self.sign:
data['gpg_signature'] = (os.path.basename(filename) + ".asc",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Removed the "built with" comment added when ``setup.py upload`` is used with
either ``bdist_rpm`` or ``bdist_dumb``.

0 comments on commit 4e80f5c

Please sign in to comment.