feat: add skip_pyc_compilation configuration option#5737
Open
Conversation
…ython Add `skip_pyc_compilation` field to `Python` struct in recipe_stage0 and `PythonBackendConfig` in pixi_build_python, allowing users to set `skip-pyc-compilation = true` in `[package.build.config]` to skip .pyc bytecode compilation during package installation. https://claude.ai/code/session_01NHP4pN28RENjggL18o5SST
lucascolley
reviewed
Mar 20, 2026
Collaborator
lucascolley
left a comment
There was a problem hiding this comment.
rattler-build accepts a glob rather than a bool, could you quickly explain how this is plumbed through? For my use-case the bool is fine but maybe a glob would be more flexible?
rattler-build expects skip_pyc_compilation to be a list of glob patterns (ConditionalList<String> / GlobVec), not a boolean. Update the field type to Vec<String> in both the Python recipe struct and PythonBackendConfig. Usage in pixi.toml: [package.build.config] skip-pyc-compilation = ["**/*.py"] https://claude.ai/code/session_01NHP4pN28RENjggL18o5SST
…> type The Python binding was still using `false` (bool) instead of `vec![]` for the skip_pyc_compilation field after the type change. https://claude.ai/code/session_01NHP4pN28RENjggL18o5SST
lucascolley
requested changes
Mar 21, 2026
Collaborator
lucascolley
left a comment
There was a problem hiding this comment.
currently not working:
❯ tixi build
Error: × could not initialize the build-backend
├─▶ × failed to parse configuration
│
╰─▶ × unknown field `skip_pyc_compilation`, expected one of `noarch`, `extra-args`, `env`, `debug-dir`, `debug_dir`, `extra-input-globs`, `compilers`, `ignore-
│ pyproject-manifest`, `ignore-pypi-mapping`, `abi3`
lucascolley
approved these changes
Mar 21, 2026
Collaborator
lucascolley
left a comment
There was a problem hiding this comment.
I wasn't using the build backend from source. Pushed a commit to make that possible, and now it works 🎉 thanks!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds a new
skip_pyc_compilationconfiguration option to the Python backend that allows users to skip the compilation of.pyfiles to.pycbytecode files during package installation.This is useful to reduce compilation times e.g. for NumPy TSAN builds.
https://claude.ai/code/session_01NHP4pN28RENjggL18o5SST