EuroPython 2026 Packaging Summit
2026-07-13

ASAN_OPTIONS)pixi is to conda as uv is to pip
uv under the hood) and conda packages
pixi run test-asan invocation to trigger all of the following:
python/cpython and build an instrumented variant from a specific revisionnumpy/numpy and build an instrumented variant from a specific revision, which has a build dependency on the python package just builtpixi run test-asan invocation to trigger all of the following:
scipy source, including build dependencies on the above packagesscipyAn open PR to SciPy which documented the process before this work:
#. Set ``ASAN_OPTIONS=detect_leaks=0:symbolize=1:strict_init_order=true:allocator_may_return_null=1:use_sigaltstack=0``
#. Compile CPython_ with ``--with-address-sanitizer`` and use it to setup a test environment
#. Build NumPy_ with the ``setup-args`` config setting set to ``-Db_sanitize=address``
* Eg. ``pip install numpy --no-cache-dir --no-binary numpy -Csetup-args="-Db_sanitize=address" -v``
#. In the project root directory, set the compiler flags as follows:
* ``CFLAGS="-fsanitize=address -fno-omit-frame-pointer -fsanitize-ignorelist=$(pwd)/tools/asan-ignore.txt"``
* ``CXXFLAGS="-fsanitize=address -fno-omit-frame-pointer -fsanitize-ignorelist=$(pwd)/tools/asan-ignore.txt"``
#. Build SciPy using ``spin build --clean``python/cpython/Tools/pixi-packages:
cpython sourcegit URL and revisionnumpy/numpy/pixi-packages (the same pattern could follow for other dependencies)[feature.asan.dependencies]
python.flags = ["asan"]
python.git = "https://github.com/lucascolley/cpython"
python.subdirectory = "Tools/pixi-packages"
python.rev = "8b5b0c29797cf88d78ef014916a5e5a5d51bbf95"
numpy.flags = ["asan"]
numpy.git = "https://github.com/lucascolley/numpy"
numpy.subdirectory = "pixi-packages/asan"
numpy.rev = "6bc853b2fbb3721332de7e5dc44ea9b282bc260a"Instrumented CPython builds with Pixi - https://lucascolley.github.io/talks