Skip to content

Commit 375594b

Browse files
committed
WIP: ENH: Pixi package definitions for downstream development
[skip ci]
1 parent 53ec7c8 commit 375594b

File tree

7 files changed

+161
-0
lines changed

7 files changed

+161
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ Tools/msi/obj
158158
Tools/ssl/amd64
159159
Tools/ssl/win32
160160
Tools/freeze/test/outdir
161+
Tools/pixi-packages/**/.pixi
161162

162163
# The frozen modules are always generated by the build so we don't
163164
# keep them in the repo. Also see Tools/build/freeze_modules.py.

Tools/pixi-packages/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- see comments for which fields should be maintained and kept up-to-date
2+
- combining directories blocked on https://github.com/prefix-dev/pixi/issues/4599

Tools/pixi-packages/asan/pixi.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[workspace]
2+
channels = ["https://prefix.dev/conda-forge"]
3+
platforms = ["osx-arm64"]
4+
preview = ["pixi-build"]
5+
6+
[package.build.backend]
7+
name = "pixi-build-rattler-build"
8+
version = "*"
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
context:
2+
# XXX: keep up to date
3+
version: "3.15"
4+
minor_version: "3.15"
5+
6+
package:
7+
name: python
8+
version: ${{ version }}
9+
10+
source:
11+
- path: ../../..
12+
13+
build:
14+
files:
15+
exclude:
16+
- "*.o"
17+
script:
18+
file: ../build.sh
19+
env:
20+
MINOR_VERSION: ${{ minor_version }}
21+
PYTHON_ASAN: "1"
22+
23+
# XXX: maybe not all requirements necessary
24+
# derived from https://github.com/conda-forge/python-feedstock/blob/main/recipe/meta.yaml
25+
requirements:
26+
build:
27+
- ${{ compiler('c') }}
28+
- ${{ compiler('cxx') }}
29+
- make
30+
- libtool
31+
- pkg-config
32+
# configure script looks for llvm-ar for lto
33+
- clang-18
34+
- llvm-tools-18
35+
36+
host:
37+
- bzip2
38+
- sqlite
39+
- liblzma-devel
40+
- zlib
41+
- openssl
42+
- readline
43+
- tk
44+
# These two are just to get the headers needed for tk.h, but is unused
45+
- xorg-libx11
46+
- xorg-xorgproto
47+
- ncurses
48+
- libffi
49+
- libmpdec-devel
50+
- expat
51+
52+
about:
53+
homepage: https://www.python.org/
54+
license: Python-2.0
55+
license_file: LICENSE

Tools/pixi-packages/build.sh

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/bin/bash
2+
3+
if [[ "${PYTHON_ASAN}" == 1 ]]; then
4+
echo "BUILD TYPE: ASAN"
5+
BUILD_DIR="../build_asan"
6+
CONFIGURE_EXTRA="--with-address-sanitizer"
7+
export ASAN_OPTIONS="detect_leaks=0:symbolize=1:strict_init_order=true:allocator_may_return_null=1:use_sigaltstack=0"
8+
else
9+
echo "BUILD TYPE: DEFAULT"
10+
BUILD_DIR="../build"
11+
CONFIGURE_EXTRA=""
12+
fi
13+
14+
mkdir -p "${BUILD_DIR}"
15+
cd "${BUILD_DIR}"
16+
17+
if [[ -f configure-done ]]; then
18+
echo "Skipping configure step, already done."
19+
else
20+
"${SRC_DIR}/configure" \
21+
--prefix="${PREFIX}" \
22+
--oldincludedir="${BUILD_PREFIX}/${HOST}/sysroot/usr/include" \
23+
--enable-shared \
24+
--srcdir="${SRC_DIR}" \
25+
${CONFIGURE_EXTRA}
26+
fi
27+
28+
touch configure-done
29+
30+
make -j"${CPU_COUNT}" install
31+
ln -sf "${PREFIX}/bin/python${MINOR_VERSION}" "${PREFIX}/bin/python"
32+
# https://github.com/prefix-dev/rattler-build/issues/2012
33+
cp "${BUILD_PREFIX}/lib/clang/21/lib/darwin/libclang_rt.asan_osx_dynamic.dylib" "${PREFIX}/lib/libclang_rt.asan_osx_dynamic.dylib"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[workspace]
2+
channels = ["https://prefix.dev/conda-forge"]
3+
platforms = ["osx-arm64"]
4+
preview = ["pixi-build"]
5+
6+
[package.build.backend]
7+
name = "pixi-build-rattler-build"
8+
version = "*"
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
context:
2+
# XXX: keep up to date
3+
version: "3.15"
4+
minor_version: "3.15"
5+
6+
package:
7+
name: python
8+
version: ${{ version }}
9+
10+
source:
11+
- path: ../../..
12+
13+
build:
14+
files:
15+
exclude:
16+
- "*.o"
17+
script:
18+
file: ../build.sh
19+
env:
20+
MINOR_VERSION: ${{ minor_version }}
21+
22+
# XXX: maybe not all requirements necessary
23+
# derived from https://github.com/conda-forge/python-feedstock/blob/main/recipe/meta.yaml
24+
requirements:
25+
build:
26+
- ${{ compiler('c') }}
27+
- ${{ compiler('cxx') }}
28+
- make
29+
- libtool
30+
- pkg-config
31+
# configure script looks for llvm-ar for lto
32+
- clang-18
33+
- llvm-tools-18
34+
35+
host:
36+
- bzip2
37+
- sqlite
38+
- liblzma-devel
39+
- zlib
40+
- openssl
41+
- readline
42+
- tk
43+
# These two are just to get the headers needed for tk.h, but is unused
44+
- xorg-libx11
45+
- xorg-xorgproto
46+
- ncurses
47+
- libffi
48+
- libmpdec-devel
49+
- expat
50+
51+
about:
52+
homepage: https://www.python.org/
53+
license: Python-2.0
54+
license_file: LICENSE

0 commit comments

Comments
 (0)