Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
rtl-manifest
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Byron Lathi
rtl-manifest
Commits
b8cd278c
Commit
b8cd278c
authored
3 weeks ago
by
Byron Lathi
Browse files
Options
Downloads
Patches
Plain Diff
Updates for incdirs
parent
7801876c
Branches
master
No related tags found
No related merge requests found
Pipeline
#981
passed
3 weeks ago
Stage: build
Stage: test
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
pyproject.toml
+1
-1
1 addition, 1 deletion
pyproject.toml
src/rtl_manifest/rtl_manifest.py
+21
-21
21 additions, 21 deletions
src/rtl_manifest/rtl_manifest.py
with
22 additions
and
22 deletions
pyproject.toml
+
1
−
1
View file @
b8cd278c
...
...
@@ -35,7 +35,7 @@ name = "rtl-manifest" # REQUIRED, is the only field that cannot be marked as dy
# https://packaging.python.org/guides/single-sourcing-package-version/
# dynamic = ["version"]
version
=
"0.3.
0
"
# REQUIRED, although can be dynamic
version
=
"0.3.
1
"
# REQUIRED, although can be dynamic
# This is a one-line description or tagline of what your project does. This
# corresponds to the "Summary" metadata field:
...
...
This diff is collapsed.
Click to expand it.
src/rtl_manifest/rtl_manifest.py
+
21
−
21
View file @
b8cd278c
...
...
@@ -34,26 +34,26 @@ def parse(source_file: str) -> Tuple[List[str], List[str]]:
files
=
[]
incdirs
=
[]
base_dir
=
pathlib
.
Path
(
source_file
).
parent
with
open
(
source_file
,
"
r
"
)
as
file
:
for
line
in
file
:
path
=
line
.
strip
()
if
path
.
startswith
(
"
#
"
):
continue
if
path
==
""
:
continue
if
path
.
startswith
(
"
`include
"
):
abs_path
=
pathlib
.
Path
(
base_dir
/
path
.
split
()[
1
]).
absolute
(
)
incdirs
.
append
(
abs_path
)
continue
if
(
path
.
endswith
(
"
sources.list
"
)):
new_path
=
pathlib
.
Path
(
base_dir
)
/
path
for
recursive_path
in
parse
(
new_path
)
:
files
.
append
(
recursive_path
)
else
:
abs_path
=
pathlib
.
Path
(
base_dir
/
path
).
absolute
()
files
.
append
(
str
(
abs_path
)
)
def
_recursive_parse
(
source_file
:
str
):
base_dir
=
pathlib
.
Path
(
source_file
).
parent
with
open
(
source_file
,
"
r
"
)
as
file
:
for
line
in
file
:
path
=
line
.
strip
()
if
path
.
startswith
(
"
#
"
):
continue
if
path
==
""
:
continue
if
path
.
startswith
(
"
`include
"
):
abs_path
=
pathlib
.
Path
(
base_dir
/
path
.
split
()[
1
]).
absolute
()
incdirs
.
append
(
str
(
abs_path
)
)
continue
if
(
path
.
endswith
(
"
sources.list
"
)):
new_path
=
pathlib
.
Path
(
base_dir
)
/
path
_recursive_parse
(
new_
path
)
else
:
abs_path
=
pathlib
.
Path
(
base_dir
/
path
).
absolute
(
)
files
.
append
(
str
(
abs_path
))
_recursive_parse
(
source_file
)
return
files
,
incdirs
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment