Skip to content

Commit 08e599c

Browse files
gfrankliuCopilot
andauthored
test(zipapp): allow macOS libpython dylibs
Address PR review finding: the runtime-size assertion should mirror the Linux-only .so exclusion. macOS hermetic runtimes intentionally retain libpython dylibs, so only reject libpython shared-object entries. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 68cb8f8 commit 08e599c

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎tests/py_zipapp/venv_zipapp_test.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,10 @@ def test_zipapp_structure(self):
8585
# On Windows, pyvenv.cfg and bin/python3 are generated at runtime.
8686
if os.name != "nt":
8787
self.assertFalse(
88-
any("/lib/libpython" in name for name in namelist),
88+
any(
89+
"/lib/libpython" in name and ".so" in name
90+
for name in namelist
91+
),
8992
"Statically linked Python should not bundle libpython",
9093
)
9194
self.assertHasPathMatchingSuffix(namelist, "/pyvenv.cfg")

0 commit comments

Comments
 (0)