Skip to content
Merged
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
7 changes: 3 additions & 4 deletions Tools/pixi-packages/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,13 @@ Each package definition is contained in a subdirectory, but they share the build
`build.sh` in this directory. Currently defined package variants:

- `default`
- `free-threading`
- `freethreading`
- `asan`: ASan-instrumented build
- `tsan-free-threading`: TSan-instrumented free-threading build
- `tsan_freethreading`: TSan-instrumented free-threading build

## Maintenance

- Keep the `version` fields in each `recipe.yaml` up to date with the Python version
- Keep the dependency requirements up to date in each `recipe.yaml`
- Keep the `abi_tag` and `version` fields in each `pixi.toml` up to date with the Python version
- Update `build.sh` for any breaking changes in the `configure` and `make` workflow

## Opportunities for future improvement
Expand Down
5 changes: 5 additions & 0 deletions Tools/pixi-packages/asan/pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ channels = ["https://prefix.dev/conda-forge"]
platforms = ["osx-arm64", "linux-64"]
preview = ["pixi-build"]

[workspace.build-variants]
variant = ["asan"]
abi_tag = ["cp315"]
version = ["3.15"]

[package.build.backend]
name = "pixi-build-rattler-build"
version = "*"
63 changes: 0 additions & 63 deletions Tools/pixi-packages/asan/recipe.yaml

This file was deleted.

1 change: 1 addition & 0 deletions Tools/pixi-packages/asan/recipe.yaml
5 changes: 3 additions & 2 deletions Tools/pixi-packages/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

if [[ "${PYTHON_VARIANT}" == "free-threading" ]]; then
if [[ "${PYTHON_VARIANT}" == "freethreading" ]]; then
echo "BUILD TYPE: FREE-THREADING"
BUILD_DIR="../build_free_threading"
CONFIGURE_EXTRA="--disable-gil"
Expand All @@ -9,7 +9,7 @@ elif [[ "${PYTHON_VARIANT}" == "asan" ]]; then
BUILD_DIR="../build_asan"
CONFIGURE_EXTRA="--with-address-sanitizer"
export ASAN_OPTIONS="strict_init_order=true"
elif [[ "${PYTHON_VARIANT}" == "tsan-free-threading" ]]; then
elif [[ "${PYTHON_VARIANT}" == "tsan_freethreading" ]]; then
echo "BUILD TYPE: TSAN FREE-THREADING"
BUILD_DIR="../build_tsan_free_threading"
CONFIGURE_EXTRA="--disable-gil --with-thread-sanitizer"
Expand All @@ -31,6 +31,7 @@ else
--oldincludedir="${BUILD_PREFIX}/${HOST}/sysroot/usr/include" \
--enable-shared \
--srcdir="${SRC_DIR}" \
--with-system-expat \
${CONFIGURE_EXTRA}
fi

Expand Down
5 changes: 5 additions & 0 deletions Tools/pixi-packages/default/pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ channels = ["https://prefix.dev/conda-forge"]
platforms = ["osx-arm64", "linux-64"]
preview = ["pixi-build"]

[workspace.build-variants]
variant = ["default"]
abi_tag = ["cp315"]
version = ["3.15"]

[package.build.backend]
name = "pixi-build-rattler-build"
version = "*"
119 changes: 73 additions & 46 deletions Tools/pixi-packages/default/recipe.yaml
Original file line number Diff line number Diff line change
@@ -1,59 +1,86 @@
context:
# Keep up to date
version: "3.15"
version: ${{ version }}
variant: ${{ variant }}
freethreading_tag: ${{ "t" if "freethreading" in variant else "" }}
abi_tag: ${{ abi_tag }}

package:
recipe:
name: python
version: ${{ version }}

source:
- path: ../../..

build:
files:
exclude:
- "*.o"
script:
file: ../build.sh
outputs:
- package:
name: python_abi
version: ${{ version }}
build:
string: "0_${{ variant }}_${{ abi_tag }}"
requirements:
run_constraints:
- python ${{ version }}.* *_${{ variant }}_${{ abi_tag }}

# derived from https://github.com/conda-forge/python-feedstock/blob/main/recipe/meta.yaml
requirements:
- package:
name: python
version: ${{ version }}
build:
- ${{ compiler('c') }}
- ${{ compiler('cxx') }}
- make
- pkg-config
# configure script looks for llvm-ar for lto
- if: osx
then:
- llvm-tools
- if: linux
then:
- ld_impl_${{ target_platform }}
- binutils_impl_${{ target_platform }}
- clang-19
- llvm-tools-19

host:
- bzip2
- sqlite
- liblzma-devel
- zlib
- zstd
- openssl
- readline
- tk
# These two are just to get the headers needed for tk.h, but is unused
- xorg-libx11
- xorg-xorgproto
- ncurses
- libffi
- if: linux
then:
- ld_impl_${{ target_platform }}
- libuuid
- libmpdec-devel
- expat
string: "0_${{ variant }}_${{ abi_tag }}"
files:
exclude:
- "*.o"
script:
file: ../build.sh
env:
PYTHON_VARIANT: ${{ variant }}
python:
site_packages_path: "lib/python${{ version }}${{ freethreading_tag }}/site-packages"

# derived from https://github.com/conda-forge/python-feedstock/blob/main/recipe/meta.yaml
requirements:
build:
- ${{ compiler('c') }}
- ${{ compiler('cxx') }}
- make
- pkg-config
# configure script looks for llvm-ar for lto
- if: osx
then:
- llvm-tools

host:
- bzip2
- sqlite
- liblzma-devel
- zlib
- zstd
- openssl
- readline
- tk
# These two are just to get the headers needed for tk.h, but is unused
- xorg-libx11
- xorg-xorgproto
- ncurses
- libffi
- if: linux
then:
- libuuid
- libmpdec-devel
- expat
- if: c_compiler == "gcc" and "san" in variant
then:
- libsanitizer

ignore_run_exports:
from_package:
- xorg-libx11
- xorg-xorgproto

run_exports:
noarch:
- python
weak:
- python_abi ${{ version }}.* *_${{ variant }}_${{ abi_tag }}

about:
homepage: https://www.python.org/
Expand Down
63 changes: 0 additions & 63 deletions Tools/pixi-packages/free-threading/recipe.yaml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ channels = ["https://prefix.dev/conda-forge"]
platforms = ["osx-arm64", "linux-64"]
preview = ["pixi-build"]

[workspace.build-variants]
variant = ["freethreading"]
abi_tag = ["cp315t"]
version = ["3.15"]

[package.build.backend]
name = "pixi-build-rattler-build"
version = "*"
1 change: 1 addition & 0 deletions Tools/pixi-packages/freethreading/recipe.yaml
Loading