Expand env vars
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
python3 -m venv .venv
|
||||
source .venv/bin/activate
|
||||
pip install -r requirements.txt
|
||||
|
||||
export TOP_DIR=$(git rev-parse --show-toplevel)
|
||||
|
||||
@@ -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.1" # REQUIRED, although can be dynamic
|
||||
version = "0.4.0" # 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:
|
||||
|
||||
@@ -3,6 +3,8 @@ import argparse
|
||||
from typing import List, Tuple
|
||||
import pathlib
|
||||
|
||||
import os
|
||||
|
||||
|
||||
def rtl_manifest_main():
|
||||
parser = argparse.ArgumentParser(
|
||||
@@ -38,7 +40,7 @@ def parse(source_file: str) -> Tuple[List[str], List[str]]:
|
||||
base_dir = pathlib.Path(source_file).parent
|
||||
with open(source_file, "r") as file:
|
||||
for line in file:
|
||||
path = line.strip()
|
||||
path = os.path.expandvars(line.strip())
|
||||
if path.startswith("#"):
|
||||
continue
|
||||
if path == "":
|
||||
|
||||
0
test/other_file.txt
Normal file
0
test/other_file.txt
Normal file
@@ -4,3 +4,5 @@ src/example.sv
|
||||
|
||||
# ^ above was a blank line
|
||||
`include .
|
||||
|
||||
$TOP_DIR/src/other_file.txt
|
||||
|
||||
Reference in New Issue
Block a user