-
-
Notifications
You must be signed in to change notification settings - Fork 34.8k
gh-152384: pixi-packages: use flags to define variants
#152385
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,34 +10,34 @@ in a [Pixi workspace](https://pixi.sh/latest/first_workspace/), like: | |
| ```toml | ||
| [dependencies] | ||
| python.git = "https://github.com/python/cpython" | ||
| python.subdirectory = "Tools/pixi-packages/asan" | ||
| python.subdirectory = "Tools/pixi-packages" | ||
| python.flags = "asan" | ||
| ``` | ||
|
|
||
| This is particularly useful when developers need to build CPython from source | ||
| (for example, for an ASan or TSan-instrumented build), as it does not require any manual | ||
| clone or build steps. Instead, Pixi will automatically handle both the build | ||
| and installation of the package. | ||
|
|
||
| Each package definition is contained in a subdirectory, but they share the build script | ||
| `build.sh` in this directory. Currently defined package variants: | ||
| Each package variant carries a 'flag' to enable selection of that variant — see | ||
| [the Pixi docs](https://pixi.prefix.dev/latest/concepts/package_specifications/#extras-and-flags | ||
| for details of how to use this. Currently defined package variants: | ||
|
|
||
| - `default` | ||
| - `freethreading` | ||
| - `asan`: ASan-instrumented build | ||
| - `tsan-freethreading`: TSan-instrumented free-threading build | ||
| - `tsan_freethreading`: TSan-instrumented free-threading build | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it makes sense to remove the |
||
|
|
||
| ## Maintenance | ||
|
|
||
| - Keep the `abi_tag` and `version` fields in each `variants.yaml` up to date with the | ||
| - Keep the `abi_tag` and `version` fields in `variants.yaml` up to date with the | ||
| Python version | ||
| - Update `build.sh` for any breaking changes in the `configure` and `make` workflow | ||
|
|
||
| ## Opportunities for future improvement | ||
|
|
||
| - More package variants (such as UBSan) | ||
| - Support for Windows | ||
| - Using a single `pixi.toml` for all package variants is blocked on | ||
| [pixi#5248](https://github.com/prefix-dev/pixi/issues/5248) | ||
|
|
||
| ## Troubleshooting | ||
|
|
||
|
|
||
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| version: ["3.16"] | ||
|
|
||
| openssl: | ||
| - '3.5' | ||
|
Comment on lines
+3
to
+4
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ref. prefix-dev/pixi#6460 (comment) @h-vetinari, I wonder whether there is a better way to do this by pulling in (some of?) https://github.com/conda-forge/conda-forge-pinning-feedstock/blob/main/recipe/conda_build_config.yaml
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. obviously you could download the current pinning file, yaml-load it and extract the openssl pin, but that's perhaps more complexity and dynamism than justified - an argument could be made that openssl is special enough to handle it separately... and although pins have a habit of going stale, staying on an LTS version probably makes sense here. conda-forge will probably migrate to openssl 4 in the fall, but since AFAICT python has no other dependencies that are themselves openssl-dependent, this should not cause any conflicts (except in larger environments with the most recent builds, but that's not really relevant for the ASAN stuff).
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
an idea was floated at some point that variant configs themselves could be packaged as conda packages and Pixi could consume them that way. Not sure if anyone has thought about that recently.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I mean, |
||
|
|
||
| zip_keys: [["variant", "abi_tag"]] | ||
| variant: ["default", "asan", "freethreading", "tsan_freethreading"] | ||
| abi_tag: ["cp316", "asan_cp316", "cp316t", "tsan_cp316t"] | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.