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:28:38 2016 -0300 @@ -702,7 +702,6 @@ 'print_commands()'. """ print(header + ":") - for cmd in commands: klass = self.cmdclass.get(cmd) if not klass: @@ -738,12 +737,12 @@ if len(cmd) > max_length: max_length = len(cmd) - self.print_command_list(std_commands, + self.print_command_list(sorted(std_commands), "Standard commands", max_length) if extra_commands: print() - self.print_command_list(extra_commands, + self.print_command_list(sorted(extra_commands), "Extra commands", max_length)