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

Support shipping precompiled layers #88

Open
ncoghlan opened this issue Nov 19, 2024 · 0 comments
Open

Support shipping precompiled layers #88

ncoghlan opened this issue Nov 19, 2024 · 0 comments
Assignees
Labels
Affects: Python API Affects the public Python API of the project Affects: Spec Format Affect the stack specification format Category: Enhancement New feature or request

Comments

@ncoghlan
Copy link
Collaborator

ncoghlan commented Nov 19, 2024

Wheels typically omit pyc files because they can target multiple Python versions with a single wheel archive (due to the stable ABI, even wheels with compiled extension modules can do that).

This is less useful for venvstacks layers (especially Windows layers that end up with bound_to_implementation set to true), since they're coupled to a specific version of the underlying base runtime layer.

This leads to the following enhancement request:

  • add a precompile flag to layer definitions (defaulting to true)
  • when the flag is omitted or set, layers are fully compiled at build time, and the __pycache__ folders are kept during export and archiving
  • when the flag is explicitly cleared, the __pycache__ folders are omitted and the layers are compiled during the post-installation step (the existing behaviour)
@ncoghlan ncoghlan added Category: Enhancement New feature or request Affects: Python API Affects the public Python API of the project Affects: Spec Format Affect the stack specification format labels Nov 19, 2024
@ncoghlan ncoghlan self-assigned this Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Affects: Python API Affects the public Python API of the project Affects: Spec Format Affect the stack specification format Category: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant