Skip to content

Commit f13c8da

Browse files
committed
rename var, look for .zip, not .pyz
1 parent 37c31d7 commit f13c8da

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

python/private/zipapp/py_zipapp_rule.bzl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -239,22 +239,22 @@ def _py_zipapp_executable_impl(ctx):
239239
python_binary_path = python_exe_path,
240240
use_zip_file = True,
241241
)
242-
default_output = depset([executable, zip_file])
242+
default_outputs = [executable, zip_file]
243243
else:
244244
preamble = _create_shell_bootstrap(ctx, py_runtime, py_executable, stage2_bootstrap)
245245
executable = _create_self_executable_zip(ctx, preamble, zip_file)
246-
default_output = depset([executable])
246+
default_outputs = [executable]
247247
else:
248248
# Bazel requires executable=True rules to have an executable given, so give
249249
# a fake one to satisfy that.
250-
default_output = depset([zip_file])
250+
default_outputs = [zip_file]
251251
executable = ctx.actions.declare_file(ctx.label.name + "-not-executable")
252252
ctx.actions.write(executable, "echo 'ERROR: Non executable zip file'; exit 1")
253253

254254
return [
255255
DefaultInfo(
256-
files = default_output,
257-
runfiles = ctx.runfiles(files = default_output.to_list()),
256+
files = depset(default_outputs),
257+
runfiles = ctx.runfiles(files = default_outputs),
258258
executable = executable,
259259
),
260260
]

tests/py_zipapp/venv_zipapp_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def _open_zipapp(self, path):
6161
try:
6262
zf = zipfile.ZipFile(path, "r")
6363
except zipfile.BadZipFile:
64-
path = path.replace(".exe", ".pyz")
64+
path = path.replace(".exe", ".zip")
6565
zf = zipfile.ZipFile(path, "r")
6666
yield zf
6767
else:

0 commit comments

Comments
 (0)