summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/setup.py b/setup.py
index 405a39061..1bb291b47 100755
--- a/setup.py
+++ b/setup.py
@@ -171,6 +171,29 @@ def get_args(cls, dist, header=None):
ScriptWriter.get_args = get_args
+class ShowVersions(Command):
+ description = 'show package versions used'
+ user_options = []
+
+ def initialize_options(self):
+ pass
+
+ def finalize_options(self):
+ pass
+
+ def run(self):
+ import io
+ out = io.StringIO()
+ out.write("Install dependencies:\n")
+ for r in self.distribution.fetch_build_eggs(self.distribution.install_requires):
+ out.write(" {}\n".format(r))
+ out.write("\n")
+ out.write("Test dependencies:\n")
+ for r in self.distribution.fetch_build_eggs(self.distribution.tests_require):
+ out.write(" {}\n".format(r))
+ print(out.getvalue())
+
+
#####################################################
# gRPC command for code generation #
#####################################################
@@ -220,6 +243,7 @@ class BuildGRPC(Command):
def get_cmdclass():
cmdclass = {
'build_grpc': BuildGRPC,
+ 'show': ShowVersions,
}
cmdclass.update(versioneer.get_cmdclass())
return cmdclass