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
dbb5f091
Commit
dbb5f091
authored
Oct 28, 2019
by
Tristan Gingold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
main.py: add comment, move code.
parent
b8a5a118
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
7 deletions
+12
-7
action.py
hdlmake/action/action.py
+7
-7
main.py
hdlmake/main.py
+5
-0
No files found.
hdlmake/action/action.py
View file @
dbb5f091
...
...
@@ -47,6 +47,13 @@ class Action(object):
self
.
_deps_solved
=
False
self
.
options
=
options
def
__contains
(
self
,
module
):
"""Check if the pool contains the given module by checking the URL"""
for
mod
in
self
.
manifests
:
if
mod
.
url
==
module
.
url
:
return
True
return
False
def
_add
(
self
,
new_module
):
"""Add the given new module if this is not already in the pool"""
assert
isinstance
(
new_module
,
Module
),
"Expect a Module instance"
...
...
@@ -177,13 +184,6 @@ class Action(object):
config_dict
=
manifest_dict_tmp
return
config_dict
def
__contains
(
self
,
module
):
"""Check if the pool contains the given module by checking the URL"""
for
mod
in
self
.
manifests
:
if
mod
.
url
==
module
.
url
:
return
True
return
False
def
__str__
(
self
):
"""Cast the module list as a list of strings"""
return
str
([
str
(
m
)
for
m
in
self
.
manifests
])
hdlmake/main.py
View file @
dbb5f091
...
...
@@ -56,7 +56,12 @@ def hdlmake(args):
# Create a ModulePool object, this will become our workspace
action
=
Commands
(
options
)
# Load all manifests, starting from the top-one (the one in the
# current directory)
action
.
load_all_manifests
()
# Extract tool and top entity.
action
.
setup
()
# Execute the appropriated action for the freshly created modules pool
...
...
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