|
| 1 | +## CPython Pixi Packages |
| 2 | + |
| 3 | +This directory contains definitions for [Pixi packages](https://pixi.sh/latest/reference/pixi_manifest/#the-package-section) |
| 4 | +which can be built from the CPython source code. |
| 5 | + |
| 6 | +Downstream developers can make use of these packages by adding them as git dependencies in a |
| 7 | +[Pixi workspace](https://pixi.sh/latest/first_workspace/), like: |
| 8 | + |
| 9 | +```toml |
| 10 | +[dependencies] |
| 11 | +python = { git = "https://github.com/python/cpython", subdirectory = "Tools/pixi-packages/asan" } |
| 12 | +``` |
| 13 | + |
| 14 | +This is particularly useful when developers need to build CPython from source |
| 15 | +(for example, for an ASan-instrumented build), as it does not require any manual |
| 16 | +cloning or building steps. Instead, Pixi will automatically handle both the building |
| 17 | +and installation of the package. |
| 18 | + |
| 19 | +Each package definition is contained in a subdirectory, but they share the build script |
| 20 | +`build.sh` in this directory. Currently defined package variants: |
| 21 | + |
| 22 | +- `default` |
| 23 | +- `asan`: ASan-instrumented build with `PYTHON_ASAN=1` |
| 24 | + |
| 25 | +### Maintenance |
| 26 | + |
| 27 | +- the `version` fields in each `recipe.yaml` should be kept up to date with the Python version |
| 28 | +- dependency requirements should be kept up to date in each `recipe.yaml` |
| 29 | +- `build.sh` should be updated for any breaking changes in the `configure` and `make` workflow |
| 30 | + |
| 31 | +### Opportunities for future improvement |
| 32 | + |
| 33 | +- more package variants (e.g. TSan, UBSan) |
| 34 | +- support for Windows |
| 35 | +- using a single `pixi.toml` and `recipe.yaml` for all package variants is blocked on https://github.com/prefix-dev/pixi/issues/4599 |
| 36 | +- a workaround can be removed from the build script once https://github.com/prefix-dev/rattler-build/issues/2012 is resolved |
0 commit comments