diff options
author | Sachi King <nakato@nakato.io> | 2015-12-07 19:52:21 +1300 |
---|---|---|
committer | Sachi King <nakato@nakato.io> | 2015-12-07 19:52:21 +1300 |
commit | 6a077c42aee7dbefecbce66877a050ebc860438d (patch) | |
tree | 861ef3929a2dccc3c485869ee821a2b3f150405c | |
parent | 2fdddb87721d6613bc57d5254432b63f53ecc933 (diff) | |
download | python-setuptools-bitbucket-get_command_list.tar.gz |
Add get_command_list to dist and process distutils.commands entry pointsget_command_list
-rw-r--r-- | setuptools/dist.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/setuptools/dist.py b/setuptools/dist.py index d7ad4655..c5f04b33 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -440,6 +440,14 @@ class Distribution(_Distribution): 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) |