From b859bf9ded7c6d4fb056a0b47a11caea6321de60 Mon Sep 17 00:00:00 2001 From: Sachi King Date: Mon, 7 Dec 2015 06:51:09 +0000 Subject: [PATCH 1/2] Created new branch get_command_list --HG-- branch : get_command_list From fc916c8ea1f7ac0ee5cc56dfaa0ab4ef6aee1cfb Mon Sep 17 00:00:00 2001 From: Sachi King Date: Mon, 7 Dec 2015 19:52:21 +1300 Subject: [PATCH 2/2] Add get_command_list to dist and process distutils.commands entry points --HG-- branch : get_command_list --- setuptools/dist.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/setuptools/dist.py b/setuptools/dist.py index d7ad46552a..c5f04b33d1 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -440,6 +440,14 @@ def print_commands(self): self.cmdclass[ep.name] = cmdclass return _Distribution.print_commands(self) + def get_command_list(self): + for ep in pkg_resources.iter_entry_points('distutils.commands'): + if ep.name not in self.cmdclass: + # don't require extras as the commands won't be invoked + cmdclass = ep.resolve() + self.cmdclass[ep.name] = cmdclass + return _Distribution.get_command_list(self) + def _set_feature(self,name,status): """Set feature's inclusion status""" setattr(self,self._feature_attrname(name),status)