diff -r c9e5e7a1be1d Lib/distutils/dist.py --- a/Lib/distutils/dist.py Sat Jun 11 17:55:45 2016 -0300 +++ b/Lib/distutils/dist.py Wed Jun 15 02:27:19 2016 -0300 @@ -702,7 +702,6 @@ 'print_commands()'. """ print(header + ":") - for cmd in commands: klass = self.cmdclass.get(cmd) if not klass: @@ -743,7 +742,7 @@ max_length) if extra_commands: print() - self.print_command_list(extra_commands, + self.print_command_list(sorted(extra_commands), "Extra commands", max_length)