Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
Hdlmake
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
15
Issues
15
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Hdlmake
Commits
9e378856
Commit
9e378856
authored
Jun 11, 2019
by
Tristan Gingold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reformating and cleanup.
parent
ea5484da
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
28 deletions
+22
-28
configparser.py
hdlmake/manifest_parser/configparser.py
+0
-1
variables.py
hdlmake/manifest_parser/variables.py
+2
-3
module.py
hdlmake/module/module.py
+20
-24
No files found.
hdlmake/manifest_parser/configparser.py
View file @
9e378856
...
...
@@ -233,7 +233,6 @@ types:[<type 'int'>]
def
add_config_file
(
self
,
config_file
):
"""Add the Manifest to be processed by the parser"""
self
.
config_file
=
config_file
return
True
def
add_prefix_code
(
self
,
code
):
"""Add the arbitrary Python to be executed just before the Manifest"""
...
...
hdlmake/manifest_parser/variables.py
View file @
9e378856
...
...
@@ -290,9 +290,8 @@ class ManifestParser(ConfigParser):
manifest
=
_search_for_manifest
(
path
)
if
manifest
is
None
:
raise
Exception
(
"No manifest found in path: {}"
.
format
(
path
))
else
:
logging
.
debug
(
"Parse manifest in:
%
s"
,
manifest
)
return
self
.
add_config_file
(
manifest
)
logging
.
debug
(
"Parse manifest in:
%
s"
,
manifest
)
self
.
add_config_file
(
manifest
)
def
print_help
(
self
):
"""Print the help for the Manifest parser object"""
...
...
hdlmake/module/module.py
View file @
9e378856
...
...
@@ -72,8 +72,7 @@ class Module(ModuleContent):
def
remove_dir_from_disk
(
self
):
"""Delete the module dir if it is already fetched and available"""
if
not
self
.
isfetched
:
return
assert
self
.
isfetched
logging
.
debug
(
"Removing "
+
self
.
path
)
command_tmp
=
shell
.
rmdir_command
()
+
" "
+
self
.
path
shell
.
run
(
command_tmp
)
...
...
@@ -106,8 +105,7 @@ class Module(ModuleContent):
if
self
.
manifest_dict
or
self
.
isfetched
is
False
:
return
if
self
.
path
is
None
:
raise
RuntimeError
()
assert
self
.
path
is
not
None
logging
.
debug
(
"""
***********************************************************
...
...
@@ -119,33 +117,31 @@ PARSE START: %s
manifest_parser
.
add_prefix_code
(
self
.
pool
.
options
.
prefix_code
)
manifest_parser
.
add_suffix_code
(
self
.
pool
.
options
.
suffix_code
)
parser_tmp
=
manifest_parser
.
add_manifest
(
self
.
path
)
if
not
parser_tmp
==
None
:
# Look for the Manifest.py file
manifest_parser
.
add_manifest
(
self
.
path
)
if
self
.
parent
is
None
:
extra_context
=
{}
else
:
extra_context
=
dict
(
self
.
top_module
.
manifest_dict
)
extra_context
[
"__manifest"
]
=
self
.
path
# The parse method is where most of the parser action takes place!
opt_map
=
None
try
:
opt_map
=
manifest_parser
.
parse
(
extra_context
=
extra_context
)
except
NameError
as
name_error
:
raise
Exception
(
"Error while parsing {0}:
\n
{1}: {2}."
.
format
(
self
.
path
,
type
(
name_error
),
name_error
))
self
.
manifest_dict
=
opt_map
# Parse and extract variables from it.
if
self
.
parent
is
None
:
extra_context
=
{}
else
:
self
.
manifest_dict
=
{}
extra_context
=
dict
(
self
.
top_module
.
manifest_dict
)
extra_context
[
"__manifest"
]
=
self
.
path
# The parse method is where most of the parser action takes place!
opt_map
=
None
try
:
opt_map
=
manifest_parser
.
parse
(
extra_context
=
extra_context
)
except
NameError
as
name_error
:
raise
Exception
(
"Error while parsing {0}:
\n
{1}: {2}."
.
format
(
self
.
path
,
type
(
name_error
),
name_error
))
self
.
manifest_dict
=
opt_map
# Process the parsed manifest_dict to assign the module properties
self
.
process_manifest
()
self
.
process_git_submodules
()
#
P
arse every detected submodule
#
Recurse: p
arse every detected submodule
for
module_aux
in
self
.
submodules
():
module_aux
.
parse_manifest
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment