Skip to content

Commit 4e80f5c

Browse files
pganssleencukou
authored andcommitted
bpo-35186: Remove "built with" comment in setup.py upload (GH-10414)
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.
1 parent 2dfe351 commit 4e80f5c

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

Lib/distutils/command/upload.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,8 @@ def upload_file(self, command, pyversion, filename):
121121
'requires': meta.get_requires(),
122122
'obsoletes': meta.get_obsoletes(),
123123
}
124-
comment = ''
125-
if command == 'bdist_rpm':
126-
dist, version, id = platform.dist()
127-
if dist:
128-
comment = 'built for %s %s' % (dist, version)
129-
elif command == 'bdist_dumb':
130-
comment = 'built for %s' % platform.platform(terse=1)
131-
data['comment'] = comment
124+
125+
data['comment'] = ''
132126

133127
if self.sign:
134128
data['gpg_signature'] = (os.path.basename(filename) + ".asc",
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Removed the "built with" comment added when ``setup.py upload`` is used with
2+
either ``bdist_rpm`` or ``bdist_dumb``.

0 commit comments

Comments
 (0)