Skip to content

Commit eefbaaf

Browse files
committed
Update ab.
1 parent a35af82 commit eefbaaf

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

build/protobuf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
PROTO_SEPARATOR = ";" if (platform.system() == "Windows") else ":"
1313

14+
1415
def _getprotodeps(deps):
1516
r = set()
1617
for d in deps:

build/utils.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ def collectattrs(*, targets, name, initial=[]):
4040

4141
@functools.cache
4242
def _glob_to_re(glob_str):
43+
if glob_str.startswith("./"):
44+
glob_str = normpath(join(getcwd(), glob_str))
45+
4346
opts = re.compile("([.]|[*][*]/|[*]|[?])|(.)")
4447
out = ""
4548
for pattern_match, literal_text in opts.findall(glob_str):
@@ -80,16 +83,11 @@ def iterate():
8083
for dirpath, dirnames, filenames in walk(
8184
dir, topdown=True, followlinks=True
8285
):
83-
dirpath = relpath(dirpath, dir)
86+
dirpath = relpath(dirpath, relative_to)
8487
filenames = [normpath(join(dirpath, f)) for f in filenames]
8588
matching = set()
8689
for p in include:
87-
matching.update(
88-
[
89-
normpath(relpath(join(dir, f), relative_to))
90-
for f in _glob_filter(filenames, p)
91-
]
92-
)
90+
matching.update([f for f in _glob_filter(filenames, p)])
9391
for p in exclude:
9492
matching = [n for n in matching if not _glob_matches(n, p)]
9593
for f in matching:

0 commit comments

Comments
 (0)