Skip to content

Commit bf27973

Browse files
committed
Add support for Python 3.14 on GNU Linux
1 parent cb332f8 commit bf27973

File tree

7 files changed

+44
-4
lines changed

7 files changed

+44
-4
lines changed

ci-targets.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ linux:
4949
- "3.11"
5050
- "3.12"
5151
- "3.13"
52+
- "3.14"
5253
build_options:
5354
- debug
5455
- noopt
@@ -69,6 +70,7 @@ linux:
6970
- "3.11"
7071
- "3.12"
7172
- "3.13"
73+
- "3.14"
7274
build_options:
7375
- debug
7476
- noopt
@@ -89,6 +91,7 @@ linux:
8991
- "3.11"
9092
- "3.12"
9193
- "3.13"
94+
- "3.14"
9295
build_options:
9396
- debug
9497
- noopt
@@ -109,6 +112,7 @@ linux:
109112
- "3.11"
110113
- "3.12"
111114
- "3.13"
115+
- "3.14"
112116
build_options:
113117
- debug
114118
- noopt
@@ -129,6 +133,7 @@ linux:
129133
- "3.11"
130134
- "3.12"
131135
- "3.13"
136+
- "3.14"
132137
build_options:
133138
- debug
134139
- noopt
@@ -149,6 +154,7 @@ linux:
149154
- "3.11"
150155
- "3.12"
151156
- "3.13"
157+
- "3.14"
152158
build_options:
153159
- debug
154160
- pgo
@@ -171,6 +177,7 @@ linux:
171177
- "3.11"
172178
- "3.12"
173179
- "3.13"
180+
- "3.14"
174181
build_options:
175182
- debug
176183
- pgo
@@ -193,6 +200,7 @@ linux:
193200
- "3.11"
194201
- "3.12"
195202
- "3.13"
203+
- "3.14"
196204
build_options:
197205
- debug
198206
- pgo
@@ -215,6 +223,7 @@ linux:
215223
- "3.11"
216224
- "3.12"
217225
- "3.13"
226+
- "3.14"
218227
build_options:
219228
- debug
220229
- noopt

cpython-unix/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ BUILD := $(HERE)/build.py
66
NULL :=
77
SPACE := $(subst ,, )
88

9-
ALL_PYTHON_VERSIONS := 3.9 3.10 3.11 3.12 3.13
9+
ALL_PYTHON_VERSIONS := 3.9 3.10 3.11 3.12 3.13 3.14
1010

1111
ifndef PYBUILD_TARGET_TRIPLE
1212
$(error PYBUILD_TARGET_TRIPLE not defined)

cpython-unix/build-main.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ def main():
6868
"cpython-3.11",
6969
"cpython-3.12",
7070
"cpython-3.13",
71+
"cpython-3.14",
7172
},
7273
default="cpython-3.11",
7374
help="Python distribution to build",
@@ -164,7 +165,7 @@ def main():
164165
release_tag = release_tag_from_git()
165166

166167
# Guard against accidental misuse of the free-threaded flag with older versions
167-
if "freethreaded" in args.options and python_majmin not in ("3.13",):
168+
if "freethreaded" in args.options and python_majmin not in ("3.13", "3.14"):
168169
print(
169170
"Invalid build option: 'freethreaded' is only compatible with CPython 3.13+ (got %s)"
170171
% cpython_version

cpython-unix/build.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ def build_cpython_host(
465465

466466
# Set environment variables allowing convenient testing for Python
467467
# version ranges.
468-
for v in ("3.9", "3.10", "3.11", "3.12", "3.13"):
468+
for v in ("3.9", "3.10", "3.11", "3.12", "3.13", "3.14"):
469469
normal_version = v.replace(".", "_")
470470

471471
if meets_python_minimum_version(python_version, v):
@@ -801,7 +801,7 @@ def build_cpython(
801801

802802
# Set environment variables allowing convenient testing for Python
803803
# version ranges.
804-
for v in ("3.9", "3.10", "3.11", "3.12", "3.13"):
804+
for v in ("3.9", "3.10", "3.11", "3.12", "3.13", "3.14"):
805805
normal_version = v.replace(".", "_")
806806

807807
if meets_python_minimum_version(python_version, v):
@@ -1223,6 +1223,7 @@ def main():
12231223
"cpython-3.11",
12241224
"cpython-3.12",
12251225
"cpython-3.13",
1226+
"cpython-3.14",
12261227
):
12271228
build_cpython(
12281229
settings,

cpython-unix/targets.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ aarch64-apple-darwin:
6464
- '3.11'
6565
- '3.12'
6666
- '3.13'
67+
- '3.14'
6768
needs_toolchain: true
6869
host_cc: clang
6970
host_cxx: clang++
@@ -153,6 +154,7 @@ aarch64-unknown-linux-gnu:
153154
- '3.11'
154155
- '3.12'
155156
- '3.13'
157+
- '3.14'
156158
docker_image_suffix: .cross
157159
host_cc: /usr/bin/x86_64-linux-gnu-gcc
158160
host_cxx: /usr/bin/x86_64-linux-gnu-g++
@@ -232,6 +234,7 @@ armv7-unknown-linux-gnueabi:
232234
- '3.11'
233235
- '3.12'
234236
- '3.13'
237+
- '3.14'
235238
docker_image_suffix: .cross
236239
host_cc: /usr/bin/x86_64-linux-gnu-gcc
237240
host_cxx: /usr/bin/x86_64-linux-gnu-g++
@@ -271,6 +274,7 @@ armv7-unknown-linux-gnueabihf:
271274
- '3.11'
272275
- '3.12'
273276
- '3.13'
277+
- '3.14'
274278
docker_image_suffix: .cross
275279
host_cc: /usr/bin/x86_64-linux-gnu-gcc
276280
host_cxx: /usr/bin/x86_64-linux-gnu-g++
@@ -310,6 +314,7 @@ i686-unknown-linux-gnu:
310314
- '3.11'
311315
- '3.12'
312316
- '3.13'
317+
- '3.14'
313318
needs_toolchain: true
314319
host_cc: clang
315320
host_cxx: clang++
@@ -354,6 +359,7 @@ mips-unknown-linux-gnu:
354359
- '3.11'
355360
- '3.12'
356361
- '3.13'
362+
- '3.14'
357363
docker_image_suffix: .cross
358364
host_cc: /usr/bin/x86_64-linux-gnu-gcc
359365
host_cxx: /usr/bin/x86_64-linux-gnu-g++
@@ -393,6 +399,7 @@ mipsel-unknown-linux-gnu:
393399
- '3.11'
394400
- '3.12'
395401
- '3.13'
402+
- '3.14'
396403
docker_image_suffix: .cross
397404
host_cc: /usr/bin/x86_64-linux-gnu-gcc
398405
host_cxx: /usr/bin/x86_64-linux-gnu-g++
@@ -432,6 +439,7 @@ ppc64le-unknown-linux-gnu:
432439
- '3.11'
433440
- '3.12'
434441
- '3.13'
442+
- '3.14'
435443
docker_image_suffix: .cross
436444
host_cc: /usr/bin/x86_64-linux-gnu-gcc
437445
host_cxx: /usr/bin/x86_64-linux-gnu-g++
@@ -471,6 +479,7 @@ s390x-unknown-linux-gnu:
471479
- '3.11'
472480
- '3.12'
473481
- '3.13'
482+
- '3.14'
474483
docker_image_suffix: .cross
475484
host_cc: /usr/bin/x86_64-linux-gnu-gcc
476485
host_cxx: /usr/bin/x86_64-linux-gnu-g++
@@ -554,6 +563,7 @@ x86_64-apple-darwin:
554563
- '3.11'
555564
- '3.12'
556565
- '3.13'
566+
- '3.14'
557567
needs_toolchain: true
558568
apple_sdk_platform: macosx
559569
host_cc: clang
@@ -723,6 +733,7 @@ x86_64-unknown-linux-gnu:
723733
- '3.11'
724734
- '3.12'
725735
- '3.13'
736+
- '3.14'
726737
needs_toolchain: true
727738
host_cc: clang
728739
host_cxx: clang++
@@ -767,6 +778,7 @@ x86_64_v2-unknown-linux-gnu:
767778
- '3.11'
768779
- '3.12'
769780
- '3.13'
781+
- '3.14'
770782
needs_toolchain: true
771783
host_cc: clang
772784
host_cxx: clang++
@@ -812,6 +824,7 @@ x86_64_v3-unknown-linux-gnu:
812824
- '3.11'
813825
- '3.12'
814826
- '3.13'
827+
- '3.14'
815828
needs_toolchain: true
816829
host_cc: clang
817830
host_cxx: clang++
@@ -857,6 +870,7 @@ x86_64_v4-unknown-linux-gnu:
857870
- '3.11'
858871
- '3.12'
859872
- '3.13'
873+
- '3.14'
860874
needs_toolchain: true
861875
host_cc: clang
862876
host_cxx: clang++
@@ -902,6 +916,7 @@ x86_64-unknown-linux-musl:
902916
- '3.11'
903917
- '3.12'
904918
- '3.13'
919+
- '3.14'
905920
needs_toolchain: true
906921
host_cc: clang
907922
host_cxx: clang++
@@ -944,6 +959,7 @@ x86_64_v2-unknown-linux-musl:
944959
- '3.11'
945960
- '3.12'
946961
- '3.13'
962+
- '3.14'
947963
needs_toolchain: true
948964
host_cc: clang
949965
host_cxx: clang++
@@ -987,6 +1003,7 @@ x86_64_v3-unknown-linux-musl:
9871003
- '3.11'
9881004
- '3.12'
9891005
- '3.13'
1006+
- '3.14'
9901007
needs_toolchain: true
9911008
host_cc: clang
9921009
host_cxx: clang++
@@ -1030,6 +1047,7 @@ x86_64_v4-unknown-linux-musl:
10301047
- '3.11'
10311048
- '3.12'
10321049
- '3.13'
1050+
- '3.14'
10331051
needs_toolchain: true
10341052
host_cc: clang
10351053
host_cxx: clang++

pythonbuild/downloads.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,15 @@
7979
"license_file": "LICENSE.cpython.txt",
8080
"python_tag": "cp313",
8181
},
82+
"cpython-3.14": {
83+
"url": "https://www.python.org/ftp/python/3.14.0/Python-3.14.0a3.tar.xz",
84+
"size": 22749680,
85+
"sha256": "94349df207456a575a8867c20b4ca434f870e1920dcdcc8fdf797e1af49abe90",
86+
"version": "3.14.0a3",
87+
"licenses": ["Python-2.0", "CNRI-Python"],
88+
"license_file": "LICENSE.cpython.txt",
89+
"python_tag": "cp314",
90+
},
8291
"expat": {
8392
"url": "https://github.com/libexpat/libexpat/releases/download/R_2_6_3/expat-2.6.3.tar.xz",
8493
"size": 485600,

src/validation.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1638,6 +1638,8 @@ fn validate_distribution(
16381638
"3.12"
16391639
} else if dist_filename.starts_with("cpython-3.13.") {
16401640
"3.13"
1641+
} else if dist_filename.starts_with("cpython-3.14.") {
1642+
"3.14"
16411643
} else {
16421644
return Err(anyhow!("could not parse Python version from filename"));
16431645
};

0 commit comments

Comments
 (0)