-
Notifications
You must be signed in to change notification settings - Fork 762
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
Added ability to select bytecode invalidation mode of generated .pyc #2297
Conversation
…files. Since Python 3.7, deterministic pycs are possible (see https://peps.python.org/pep-0552/) To select the bytecode invalidation mode explicitly by env var: PYC_INVALIDATION_MODE=UNCHECKED_HASH uv pip install --compile ... Valid values are TIMESTAMP (default), CHECKED_HASH, and UNCHECKED_HASH The latter options are useful for reproducible builds.
Thanks! I added specific error handling and a test and fixed a bug the error handling surfaced.
@charliermarsh and/or @zanieb: Do we have a good spot to document advanced non-cli configuration such as |
(Sorry for the CI failures, it's passing locally for me) |
@konstin I'd just add a "Compilation of Python modules" section to the "Advanced Usage" part of the README and explain |
Made a separate issue for: #2303 |
Since Python 3.7, deterministic pycs are possible (see PEP 552)
To select the bytecode invalidation mode explicitly by env var:
Valid values are TIMESTAMP (default), CHECKED_HASH, and UNCHECKED_HASH.
The latter options are useful for reproducible builds.