Skip to content

Commit

Permalink
Add Python 3.14 stable ABI support
Browse files Browse the repository at this point in the history
Given as `@nanobind_bazel//:py-limited-api=cp314`.
This enables builds with alpha/beta/rc CPython 3.14 toolchains targeting the
stable ABI from that version onwards.
  • Loading branch information
nicholasjng committed Jan 21, 2025
1 parent 5c1dc78 commit 51be494
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ string_flag(
values = [
"cp312",
"cp313",
"cp314",
"unset",
],
)
Expand All @@ -50,6 +51,11 @@ config_setting(
flag_values = {":py-limited-api": "cp313"},
)

config_setting(
name = "cp314",
flag_values = {":py-limited-api": "cp314"},
)

config_setting(
name = "pyunlimitedapi",
flag_values = {":py-limited-api": "unset"},
Expand Down
1 change: 1 addition & 0 deletions helpers.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def py_limited_api():
return select({
"@nanobind_bazel//:cp312": ["Py_LIMITED_API=0x030C0000"],
"@nanobind_bazel//:cp313": ["Py_LIMITED_API=0x030D0000"],
"@nanobind_bazel//:cp314": ["Py_LIMITED_API=0x030E0000"],
"@nanobind_bazel//:pyunlimitedapi": [],
})

Expand Down

0 comments on commit 51be494

Please sign in to comment.