Skip to content

Commit

Permalink
Update 'bdist' format addition to assume a single 'format_commands' a…
Browse files Browse the repository at this point in the history
…s a dictionary, but fall back to the dual dict/list model for compatibility with stdlib.
  • Loading branch information
jaraco committed Jul 31, 2022
1 parent bb74e2a commit b8d50cf
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions setuptools/command/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
import sys

if 'egg' not in bdist.format_commands:
bdist.format_command['egg'] = ('bdist_egg', "Python .egg file")
bdist.format_commands.append('egg')
try:
bdist.format_commands['egg'] = ('bdist_egg', "Python .egg file")
except TypeError:
# For backward compatibility with older distutils (stdlib)
bdist.format_command['egg'] = ('bdist_egg', "Python .egg file")
bdist.format_commands.append('egg')

del bdist, sys

0 comments on commit b8d50cf

Please sign in to comment.