Skip to content

Commit 97979e0

Browse files
committed
Add python_abi output and refactor
- Remove clang-19 since we are not building the experimental jit - Remove ld_impl because we are not hacking the makefiles - Add site_packages_path - Make recipe.yaml identical with just the variant name difference - Add a generate.sh to generate recipe.yaml from default variant - Add a runtime requirement of libsanitizer for gcc
1 parent 9a2a896 commit 97979e0

File tree

7 files changed

+392
-189
lines changed

7 files changed

+392
-189
lines changed

Tools/pixi-packages/asan/recipe.yaml

Lines changed: 73 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,86 @@
11
context:
22
# Keep up to date
33
version: "3.15"
4+
variant: "asan"
5+
freethreading_tag: ${{ "t" if "free-threading" in variant else "" }}
6+
abi_tag: cp${{ version | split(".") | join("") }}${{ freethreading_tag }}
47

5-
package:
8+
recipe:
69
name: python
7-
version: ${{ version }}
810

911
source:
1012
- path: ../../..
1113

12-
build:
13-
files:
14-
exclude:
15-
- "*.o"
16-
script:
17-
file: ../build.sh
18-
env:
19-
PYTHON_VARIANT: "asan"
20-
21-
# derived from https://github.com/conda-forge/python-feedstock/blob/main/recipe/meta.yaml
22-
requirements:
14+
outputs:
15+
- package:
16+
name: python_abi
17+
version: ${{ version }}
2318
build:
24-
- ${{ compiler('c') }}
25-
- ${{ compiler('cxx') }}
26-
- make
27-
- pkg-config
28-
# configure script looks for llvm-ar for lto
29-
- if: osx
30-
then:
31-
- llvm-tools
32-
- if: linux
33-
then:
34-
- ld_impl_${{ target_platform }}
35-
- binutils_impl_${{ target_platform }}
36-
- clang-19
37-
- llvm-tools-19
38-
39-
host:
40-
- bzip2
41-
- sqlite
42-
- liblzma-devel
43-
- zlib
44-
- zstd
45-
- openssl
46-
- readline
47-
- tk
48-
# These two are just to get the headers needed for tk.h, but is unused
49-
- xorg-libx11
50-
- xorg-xorgproto
51-
- ncurses
52-
- libffi
53-
- if: linux
54-
then:
55-
- ld_impl_${{ target_platform }}
56-
- libuuid
57-
- libmpdec-devel
58-
- expat
19+
string: "0_cp35"
20+
requirements:
21+
run_constraints:
22+
- python ${{ version }}.* *_cp35
23+
24+
- package:
25+
name: python
26+
version: ${{ version }}
27+
build:
28+
string: "0_cp35"
29+
files:
30+
exclude:
31+
- "*.o"
32+
script:
33+
file: ../build.sh
34+
env:
35+
PYTHON_VARIANT: ${{ variant }}
36+
python:
37+
site_packages_path: "lib/python${{ version }}${{ freethreading_tag }}/site-packages"
38+
39+
# derived from https://github.com/conda-forge/python-feedstock/blob/main/recipe/meta.yaml
40+
requirements:
41+
build:
42+
- ${{ compiler('c') }}
43+
- ${{ compiler('cxx') }}
44+
- make
45+
- pkg-config
46+
# configure script looks for llvm-ar for lto
47+
- if: osx
48+
then:
49+
- llvm-tools
50+
51+
host:
52+
- bzip2
53+
- sqlite
54+
- liblzma-devel
55+
- zlib
56+
- zstd
57+
- openssl
58+
- readline
59+
- tk
60+
# These two are just to get the headers needed for tk.h, but is unused
61+
- xorg-libx11
62+
- xorg-xorgproto
63+
- ncurses
64+
- libffi
65+
- if: linux
66+
then:
67+
- libuuid
68+
- libmpdec-devel
69+
- expat
70+
- if: c_compiler == "gcc" and "san" in variant
71+
then:
72+
- libsanitizer
73+
74+
ignore_run_exports:
75+
from_package:
76+
- xorg-libx11
77+
- xorg-xorgproto
78+
79+
run_exports:
80+
noarch:
81+
- python
82+
weak:
83+
- python_abi ${{ version }}.* *_cp${{ version | split(".") | join("") }}${{ freethreading_tag }}
5984

6085
about:
6186
homepage: https://www.python.org/

Tools/pixi-packages/build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ else
3131
--oldincludedir="${BUILD_PREFIX}/${HOST}/sysroot/usr/include" \
3232
--enable-shared \
3333
--srcdir="${SRC_DIR}" \
34+
--with-system-expat \
3435
${CONFIGURE_EXTRA}
3536
fi
3637

Tools/pixi-packages/default/recipe.yaml

Lines changed: 72 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,86 @@
11
context:
22
# Keep up to date
33
version: "3.15"
4+
variant: "default"
5+
freethreading_tag: ${{ "t" if "free-threading" in variant else "" }}
6+
abi_tag: cp${{ version | split(".") | join("") }}${{ freethreading_tag }}
47

5-
package:
8+
recipe:
69
name: python
7-
version: ${{ version }}
810

911
source:
1012
- path: ../../..
1113

12-
build:
13-
files:
14-
exclude:
15-
- "*.o"
16-
script:
17-
file: ../build.sh
14+
outputs:
15+
- package:
16+
name: python_abi
17+
version: ${{ version }}
18+
build:
19+
string: "0_cp35"
20+
requirements:
21+
run_constraints:
22+
- python ${{ version }}.* *_cp35
1823

19-
# derived from https://github.com/conda-forge/python-feedstock/blob/main/recipe/meta.yaml
20-
requirements:
24+
- package:
25+
name: python
26+
version: ${{ version }}
2127
build:
22-
- ${{ compiler('c') }}
23-
- ${{ compiler('cxx') }}
24-
- make
25-
- pkg-config
26-
# configure script looks for llvm-ar for lto
27-
- if: osx
28-
then:
29-
- llvm-tools
30-
- if: linux
31-
then:
32-
- ld_impl_${{ target_platform }}
33-
- binutils_impl_${{ target_platform }}
34-
- clang-19
35-
- llvm-tools-19
36-
37-
host:
38-
- bzip2
39-
- sqlite
40-
- liblzma-devel
41-
- zlib
42-
- zstd
43-
- openssl
44-
- readline
45-
- tk
46-
# These two are just to get the headers needed for tk.h, but is unused
47-
- xorg-libx11
48-
- xorg-xorgproto
49-
- ncurses
50-
- libffi
51-
- if: linux
52-
then:
53-
- ld_impl_${{ target_platform }}
54-
- libuuid
55-
- libmpdec-devel
56-
- expat
28+
string: "0_cp35"
29+
files:
30+
exclude:
31+
- "*.o"
32+
script:
33+
file: ../build.sh
34+
env:
35+
PYTHON_VARIANT: ${{ variant }}
36+
python:
37+
site_packages_path: "lib/python${{ version }}${{ freethreading_tag }}/site-packages"
38+
39+
# derived from https://github.com/conda-forge/python-feedstock/blob/main/recipe/meta.yaml
40+
requirements:
41+
build:
42+
- ${{ compiler('c') }}
43+
- ${{ compiler('cxx') }}
44+
- make
45+
- pkg-config
46+
# configure script looks for llvm-ar for lto
47+
- if: osx
48+
then:
49+
- llvm-tools
50+
51+
host:
52+
- bzip2
53+
- sqlite
54+
- liblzma-devel
55+
- zlib
56+
- zstd
57+
- openssl
58+
- readline
59+
- tk
60+
# These two are just to get the headers needed for tk.h, but is unused
61+
- xorg-libx11
62+
- xorg-xorgproto
63+
- ncurses
64+
- libffi
65+
- if: linux
66+
then:
67+
- libuuid
68+
- libmpdec-devel
69+
- expat
70+
- if: c_compiler == "gcc" and "san" in variant
71+
then:
72+
- libsanitizer
73+
74+
ignore_run_exports:
75+
from_package:
76+
- xorg-libx11
77+
- xorg-xorgproto
78+
79+
run_exports:
80+
noarch:
81+
- python
82+
weak:
83+
- python_abi ${{ version }}.* *_cp${{ version | split(".") | join("") }}${{ freethreading_tag }}
5784

5885
about:
5986
homepage: https://www.python.org/

0 commit comments

Comments
 (0)