diff options
author | Valentin David <valentin.david@codethink.co.uk> | 2018-08-20 13:18:39 +0200 |
---|---|---|
committer | Valentin David <valentin.david@codethink.co.uk> | 2018-09-26 16:26:21 +0200 |
commit | a3c298a7fef83b0a53fe7f393aaf75ddfa7ce8ee (patch) | |
tree | b57546f5606dda7bf7ea7fcdc8a4e8c1f4da4bea | |
parent | fdbf9be1ecf04fbc56c085a5f0a1633a06f61805 (diff) | |
download | buildstream-a3c298a7fef83b0a53fe7f393aaf75ddfa7ce8ee.tar.gz |
Add 'show' command to setup.py to used show versions of dependencies
-rwxr-xr-x | setup.py | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -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 |