Debian Codegraph @

cmake/tribits/ci_support/dump-package-dep-table.py

raw
1 #!/usr/bin/env python3
2
3 # @HEADER
4 # *****************************************************************************
5 # TriBITS: Tribal Build, Integrate, and Test System
6 #
7 # Copyright 2013-2016 NTESS and the TriBITS contributors.
8 # SPDX-License-Identifier: BSD-3-Clause
9 # *****************************************************************************
10 # @HEADER
11
12
13 #
14 # Read in the commandline arguments
15 #
16
17 usageHelp = r"""dump-package-deps-table.py [OPTIONS]
18
19 Tool that creates an HTML page showing the TriBITS Project dependencies which
20 are specified in an input XML file.
21
22 By default, if you just run:
23
24 $ SOME_DIR/dump-package-deps-table.py
25
26 then the table will get written into the main TriBITS Project source directory
27 where it can be checked in on the next checkin.
28
29 You can also change what XML input file is used and what HTML file is written.
30 This is maining to facilitate unit testing of this code.
31
32 Have fun looking through all of the TriBITS Project dependencies!
33
34 """
35
36
37 from optparse import OptionParser
38
39 clp = OptionParser(usage=usageHelp)
40
41 clp.add_option(
42 "--input-xml-deps-file", dest="inputXmlDepsFile", type="string",
43 help="Input XML file giving the TriBITS Project dependencies.")
44
45 clp.add_option(
46 "--output-html-deps-file", dest="outputHtmlDepsFile", type="string",
47 help="Output HTML file showing the TriBITS Project dependencies")
48
49 (options, args) = clp.parse_args()
50
51
52 #
53 # Execute the commands
54 #
55
56
57 from TribitsDependencies import getProjectDependenciesFromXmlFile
58
59 trilinosDependencies = getProjectDependenciesFromXmlFile(
60 options.inputXmlDepsFile)
61
62 trilinosDependencies.writeFullHtmlPage(
63 options.outputHtmlDepsFile)