pixi-packages/README.md
This directory contains definitions for Pixi packages which can be built from the NumPy source code.
Downstream developers can make use of these packages by adding them as Git dependencies in a Pixi workspace.
This is particularly useful when developers need to build NumPy from source (for example, for an ASan-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.
See scipy#24066 for a full example of downstream use.
Each package definition is contained in a subdirectory. All package variants include debug symbols.
Currently defined variants:
defaultGIL-enabled build.
Usage:
[dependencies]
python = "*"
numpy.git = "https://github.com/numpy/numpy"
numpy.subdirectory = "pixi-packages/default"
See default/pixi.toml if you wish to use python git tip instead.
Tip: you may change fork and add numpy.rev = "<branch or git hash>" to test unmerged
PRs.
freethreadingnoGIL build.
Usage:
[dependencies]
python-freethreading = "*"
numpy.git = "https://github.com/numpy/numpy"
numpy.subdirectory = "pixi-packages/freethreading"
See freethreading/pixi.toml if you wish to use python git tip instead.
asanASan-instrumented build with -Db_sanitize=address.
Usage:
[dependencies]
python.git = "https://github.com/python/cpython"
python.subdirectory = "Tools/pixi-packages/asan"
numpy.git = "https://github.com/numpy/numpy"
numpy.subdirectory = "pixi-packages/asan"
tsan-freethreadingFreethreading TSan-instrumented build with -Db_sanitize=thread.
Usage:
[dependencies]
python.git = "https://github.com/python/cpython"
python.subdirectory = "Tools/pixi-packages/tsan-freethreading"
numpy.git = "https://github.com/numpy/numpy"
numpy.subdirectory = "pixi-packages/tsan-freethreading"
TSan builds may crash on Linux with
FATAL: ThreadSanitizer: unexpected memory mapping 0x7977bd072000-0x7977bd500000
To fix it, try reducing mmap_rnd_bits:
$ sudo sysctl vm.mmap_rnd_bits
vm.mmap_rnd_bits = 32 # too high for TSan
$ sudo sysctl vm.mmap_rnd_bits=28 # reduce it
vm.mmap_rnd_bits = 28
pixi.toml for all package variants is blocked on
pixi#2813default and
freethreading recipes must be manually tweaked to compile against cpython git tip;
see default/pixi.toml and freethreading/pixi.toml for details.pixi invocations