Valentin David pushed to branch valentindavid/show_versions at BuildStream / buildstream
Commits:
- 
6ee15512
by Valentin David at 2018-08-21T09:03:20Z
- 
510d97f7
by Valentin David at 2018-08-21T09:04:34Z
2 changed files:
Changes:
| ... | ... | @@ -66,6 +66,7 @@ source_dist: | 
| 66 | 66 |    - chown -R buildstream:buildstream buildstream
 | 
| 67 | 67 |    - cd buildstream
 | 
| 68 | 68 |  | 
| 69 | +  - su buildstream -c 'python3 setup.py show'
 | |
| 69 | 70 |    # Run the tests from the source distribution, We run as a simple
 | 
| 70 | 71 |    # user to test for permission issues
 | 
| 71 | 72 |    - su buildstream -c 'python3 setup.py test --index-url invalid://uri --addopts --integration'
 | 
| ... | ... | @@ -164,6 +164,29 @@ def get_args(cls, dist, header=None): | 
| 164 | 164 |  ScriptWriter.get_args = get_args
 | 
| 165 | 165 |  | 
| 166 | 166 |  | 
| 167 | +class ShowVersions(Command):
 | |
| 168 | +    description = 'show package versions used'
 | |
| 169 | +    user_options = []
 | |
| 170 | + | |
| 171 | +    def initialize_options(self):
 | |
| 172 | +        pass
 | |
| 173 | + | |
| 174 | +    def finalize_options(self):
 | |
| 175 | +        pass
 | |
| 176 | + | |
| 177 | +    def run(self):
 | |
| 178 | +        import io
 | |
| 179 | +        out = io.StringIO()
 | |
| 180 | +        out.write("Install dependencies:\n")
 | |
| 181 | +        for r in self.distribution.fetch_build_eggs(self.distribution.install_requires):
 | |
| 182 | +            out.write("  {}\n".format(r))
 | |
| 183 | +        out.write("\n")
 | |
| 184 | +        out.write("Test dependencies:\n")
 | |
| 185 | +        for r in self.distribution.fetch_build_eggs(self.distribution.tests_require):
 | |
| 186 | +            out.write("  {}\n".format(r))
 | |
| 187 | +        print(out.getvalue())
 | |
| 188 | + | |
| 189 | + | |
| 167 | 190 |  #####################################################
 | 
| 168 | 191 |  #         gRPC command for code generation          #
 | 
| 169 | 192 |  #####################################################
 | 
| ... | ... | @@ -213,6 +236,7 @@ class BuildGRPC(Command): | 
| 213 | 236 |  def get_cmdclass():
 | 
| 214 | 237 |      cmdclass = {
 | 
| 215 | 238 |          'build_grpc': BuildGRPC,
 | 
| 239 | +        'show': ShowVersions,
 | |
| 216 | 240 |      }
 | 
| 217 | 241 |      cmdclass.update(versioneer.get_cmdclass())
 | 
| 218 | 242 |      return cmdclass
 | 
