Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions Tools/pixi-packages/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,20 @@ echo "PYTHON_VARIANT: ${PYTHON_VARIANT}"

if [[ "${PYTHON_VARIANT}" == "freethreading" ]]; then
CONFIGURE_EXTRA="--disable-gil"
elif [[ "${PYTHON_VARIANT}" == "asan" ]]; then
CONFIGURE_EXTRA="--with-address-sanitizer"
export ASAN_OPTIONS="strict_init_order=true"
elif [[ "${PYTHON_VARIANT}" == "tsan_freethreading" ]]; then
CONFIGURE_EXTRA="--disable-gil --with-thread-sanitizer"
export TSAN_OPTIONS="suppressions=${SRC_DIR}/Tools/tsan/suppressions_free_threading.txt"
elif [[ "${PYTHON_VARIANT}" == *san* ]]; then
if [[ "${PYTHON_VARIANT}" == "asan" ]]; then
CONFIGURE_EXTRA="--with-address-sanitizer"
export ASAN_OPTIONS="strict_init_order=true"
elif [[ "${PYTHON_VARIANT}" == "tsan_freethreading" ]]; then
CONFIGURE_EXTRA="--disable-gil --with-thread-sanitizer"
export TSAN_OPTIONS="suppressions=${SRC_DIR}/Tools/tsan/suppressions_free_threading.txt"
else
echo "Unknown PYTHON_VARIANT: ${PYTHON_VARIANT}"
exit 1
fi
if [[ "$target_platform" == linux-* && "$c_compiler" == "clang" ]]; then
export LDFLAGS="-shared-libsan $LDFLAGS"
Comment thread
StanFromIreland marked this conversation as resolved.
Resolved
fi
Comment thread
lucascolley marked this conversation as resolved.
Resolved
elif [[ "${PYTHON_VARIANT}" == "default" ]]; then
CONFIGURE_EXTRA=""
else
Expand Down
8 changes: 6 additions & 2 deletions Tools/pixi-packages/recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ context:
freethreading_tag: ${{ "t" if "freethreading" in variant else "" }}
abi_prefix: ${{ (variant | split("_"))[0] + "_" if "san" in variant else "" }}
abi_tag: ${{ abi_prefix }}cp${{ (version | split('.'))[:2] | join('') }}${{ freethreading_tag }}
c_compiler_version: ${{ c_compiler_version }}

recipe:
name: python
Expand Down Expand Up @@ -72,9 +73,9 @@ outputs:
- libuuid
- libmpdec-devel
- expat
- if: osx and "san" in variant
- if: '"san" in variant'
then:
- libcompiler-rt
- libcompiler-rt ${{ c_compiler_version }}.*

ignore_run_exports:
from_package:
Expand All @@ -87,6 +88,9 @@ outputs:
weak:
- python_abi ${{ version }}.* *_${{ abi_tag }}

run_constraints:
- libcompiler-rt ${{ c_compiler_version }}.*

about:
homepage: https://www.python.org/
license: Python-2.0
Expand Down
4 changes: 2 additions & 2 deletions Tools/pixi-packages/variants.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ openssl:
c_compiler:
- clang
c_compiler_version:
- 21
- 22
cxx_compiler:
- clangxx
cxx_compiler_version:
- 21
- 22
Loading