Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Produced zipapp is not reproducible due to _bootstrap file ordering #265

Open
timothyg-stripe opened this issue Nov 18, 2024 · 0 comments
Open

Comments

@timothyg-stripe
Copy link

👋 We are using shiv in reproducible mode, but we found that the output is not idempotent due to this block of code that adds the _bootstrap directory:

shiv/src/shiv/builder.py

Lines 165 to 177 in a353d10

bootstrap_target = Path("_bootstrap")
for path, name in iter_package_files(bootstrap):
data = path.read_bytes()
write_to_zipapp(
archive,
str(bootstrap_target / name),
data,
zipinfo_datetime,
compression,
stat=path.stat(),
)

In particular, iter_package_files(bootstrap) (which eventually calls Path.iterdir()) is not guaranteed to be in any particular order.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant