Commit e8f17a58 authored by Tristan Gingold's avatar Tristan Gingold

__main__.py: reformatting.

parent 4d13c3a4
...@@ -89,7 +89,6 @@ def _action_runner(modules_pool): ...@@ -89,7 +89,6 @@ def _action_runner(modules_pool):
def _get_parser(): def _get_parser():
"""This is the parser function, where options and commands are defined. """This is the parser function, where options and commands are defined.
Here, we make the next processes:
""" """
description = ("A tool designed to help FPGA designers to manage " description = ("A tool designed to help FPGA designers to manage "
+ "and share their HDL code by automatically finding file " + "and share their HDL code by automatically finding file "
...@@ -101,10 +100,8 @@ def _get_parser(): ...@@ -101,10 +100,8 @@ def _get_parser():
"makefile", "makefile",
help="write the Makefile (default action for hdlmake)") help="write the Makefile (default action for hdlmake)")
makefile.add_argument( makefile.add_argument(
"-f", "--filename", "-f", "--filename", default=None, dest="filename",
help="name for the Makefile file to be created", help="name for the Makefile file to be created")
default=None,
dest="filename")
subparsers.add_parser( subparsers.add_parser(
"fetch", "fetch",
help="fetch and/or update all of the remote modules") help="fetch and/or update all of the remote modules")
...@@ -115,93 +112,57 @@ def _get_parser(): ...@@ -115,93 +112,57 @@ def _get_parser():
"list-mods", "list-mods",
help="list all modules together with their files") help="list all modules together with their files")
listmod.add_argument( listmod.add_argument(
"--with-files", "--with-files", default=False, action="store_true", dest="withfiles",
help="list modules together with their files", help="list modules together with their files")
default=False,
action="store_true",
dest="withfiles")
listmod.add_argument( listmod.add_argument(
"--terse", "--terse", default=False, action="store_true", dest="terse",
help="do not print comments", help="do not print comments")
default=False,
action="store_true",
dest="terse")
listfiles = subparsers.add_parser( listfiles = subparsers.add_parser(
"list-files", "list-files",
help="list all of the files in the design hierarchy") help="list all of the files in the design hierarchy")
listfiles.add_argument( listfiles.add_argument(
"--delimiter", "--delimiter", dest="delimiter", default=None,
help="set delimitier for the list of files", help="set delimitier for the list of files")
dest="delimiter",
default=None)
listfiles.add_argument( listfiles.add_argument(
"--reverse", "--reverse", dest="reverse", default=False, action="store_true",
help="reverse the order for the list of files", help="reverse the order for the list of files")
dest="reverse",
default=False,
action="store_true")
listfiles.add_argument( listfiles.add_argument(
"--top", "--top", dest="top", default=None,
help="print only those files required to build 'top'", help="print only those files required to build 'top'")
dest="top",
default=None)
tree = subparsers.add_parser( tree = subparsers.add_parser(
"tree", "tree",
help="generate a module hierarchy tree graph") help="generate a module hierarchy tree graph")
tree.add_argument( tree.add_argument(
"--with-files", "--with-files", default=False, action="store_true", dest="withfiles",
help="add files to the module hierarchy tree", help="add files to the module hierarchy tree")
default=False,
action="store_true",
dest="withfiles")
tree.add_argument( tree.add_argument(
"--mode", "--mode", dest="mode", default="mods",
dest="mode",
default="mods",
help="set the working mode for the tree generator: " help="set the working mode for the tree generator: "
"(mods, dfs, bfs)") "(mods, dfs, bfs)")
subparsers.add_parser( subparsers.add_parser(
"manifest-help", "manifest-help",
help="print manifest file variables description") help="print manifest file variables description")
parser.add_argument( parser.add_argument(
'-v', '-v', '--version', action='version',
'--version',
action='version',
help="print the version of this program", help="print the version of this program",
version=parser.prog + version=parser.prog + " " + __version__)
" " +
__version__)
parser.add_argument( parser.add_argument(
'-a', '-a', '--all', action='store_true', dest="all_files",
'--all',
action='store_true',
dest="all_files",
help="use all the listed files, do not solve the fileset") help="use all the listed files, do not solve the fileset")
parser.add_argument( parser.add_argument(
"--log", "--log", dest="log", default="info",
dest="log",
default="info",
help="logging level: debug, info, warning, error, critical") help="logging level: debug, info, warning, error, critical")
parser.add_argument( parser.add_argument(
"--logfile", "--logfile", dest="logfile", default=None,
help="path to the optional log file", help="path to the optional log file")
default=None,
dest="logfile")
parser.add_argument( parser.add_argument(
"-p", "--prefix", "-p", "--prefix", dest="prefix_code", default="",
dest="prefix_code",
default="",
help="Python code executed before every Manifest.py") help="Python code executed before every Manifest.py")
parser.add_argument( parser.add_argument(
"-s", "--suffix", "-s", "--suffix", dest="suffix_code", default="",
dest="suffix_code",
default="",
help="Python code executed after every Manifest.py") help="Python code executed after every Manifest.py")
parser.add_argument( parser.add_argument(
"--full-error", "--full-error", default=False, action="store_true", dest="full_error",
default=False,
action="store_true",
dest="full_error",
help="display full error log with traceback") help="display full error log with traceback")
return parser return parser
......
...@@ -56,7 +56,8 @@ class ActionCore(Action): ...@@ -56,7 +56,8 @@ class ActionCore(Action):
"Fetching should be done before continuing.\n" "Fetching should be done before continuing.\n"
"The following modules remains unfetched:\n" "The following modules remains unfetched:\n"
" {}".format( " {}".format(
"\n ".join([str(m) for m in self if not m.isfetched]))) "\n ".join([str(m) for m in self.manifests
if not m.isfetched])))
def makefile(self): def makefile(self):
"""Write the Makefile for the current design""" """Write the Makefile for the current design"""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment