Skip to content

Commit 132174a

Browse files
committed
fix glob for windows+linux
1 parent 085bc24 commit 132174a

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

python/private/hermetic_runtime_repo_setup.bzl

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -243,10 +243,13 @@ def define_hermetic_runtime_toolchain_impl(
243243
# On Windows, a symlink-style venv requires supporting .dll files.
244244
venv_bin_files = select({
245245
"@platforms//os:windows": native.glob(
246-
include = ["*.dll"],
247-
allow_empty = False,
248-
) + native.glob(
249-
include = ["*.pdb"],
246+
include = [
247+
"*.dll",
248+
# The pdb files just provide debugging information
249+
"*.pdb",
250+
],
251+
# This must be true because glob empty-ness is checked
252+
# during loading phase, before select() filters it out.
250253
allow_empty = True,
251254
),
252255
"//conditions:default": [],

python/private/local_runtime_repo_setup.bzl

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,14 @@ def define_local_runtime_toolchain_impl(
155155
pyc_tag = "{}-{}{}{}".format(implementation_name, major, minor, abi_flags),
156156
venv_bin_files = select({
157157
"@platforms//os:windows": native.glob(
158-
include = ["lib/*.dll"],
159-
allow_empty = False,
160-
) + native.glob(
161-
include = ["lib/*.pdb"],
162-
allow_empty=True,
158+
include = [
159+
"*.dll",
160+
# The pdb files just provide debugging information
161+
"*.pdb",
162+
],
163+
# This must be true because glob empty-ness is checked
164+
# during loading phase, before select() filters it out.
165+
allow_empty = True,
163166
),
164167
"//conditions:default": [],
165168
}),

0 commit comments

Comments
 (0)