Skip to content

Commit f7d472e

Browse files
LecrisUThenryiiipre-commit-ci[bot]
authored
fix: Windows 3.13 stable ABI (#865)
Signed-off-by: Cristian Le <[email protected]> Co-authored-by: Henry Schreiner <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 8cbd92f commit f7d472e

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
strategy:
5050
fail-fast: false
5151
matrix:
52-
python-version: ["3.7", "pypy-3.9", "3.12"]
52+
python-version: ["3.7", "pypy-3.9", "3.12", "3.13"]
5353
runs-on: [ubuntu-latest, macos-13]
5454
cmake-version: ["3.15.x"]
5555

@@ -93,6 +93,9 @@ jobs:
9393
- python-version: "3.12"
9494
runs-on: windows-latest
9595
cmake-version: "3.26.x"
96+
- python-version: "3.13"
97+
runs-on: windows-latest
98+
cmake-version: "3.26.x"
9699

97100
steps:
98101
- uses: actions/checkout@v4
@@ -320,7 +323,7 @@ jobs:
320323
strategy:
321324
fail-fast: false
322325
matrix:
323-
runs-on: [ubuntu-latest, macos-14, windows-latest]
326+
runs-on: [ubuntu-latest, macos-latest, windows-latest]
324327
runs-on: ${{ matrix.runs-on }}
325328
timeout-minutes: 15
326329

@@ -331,7 +334,7 @@ jobs:
331334

332335
- uses: wntrblm/[email protected]
333336
with:
334-
python-versions: "3.11"
337+
python-versions: "3.12"
335338

336339
- name: Linkcheck
337340
run: nox -s docs -- -b linkcheck

src/scikit_build_core/builder/sysconfig.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,15 @@ def get_python_library(env: Mapping[str, str], *, abi3: bool = False) -> Path |
6262

6363
libdirstr = sysconfig.get_config_var("LIBDIR")
6464
ldlibrarystr = sysconfig.get_config_var("LDLIBRARY")
65-
librarystr = sysconfig.get_config_var("LDLIBRARY")
65+
librarystr = sysconfig.get_config_var("LIBRARY")
66+
if abi3:
67+
if ldlibrarystr is not None:
68+
ldlibrarystr = ldlibrarystr.replace(
69+
f"python3{sys.version_info[1]}", "python3"
70+
)
71+
if librarystr is not None:
72+
librarystr = librarystr.replace(f"python3{sys.version_info[1]}", "python3")
73+
6674
libdir: Path | None = libdirstr and Path(libdirstr)
6775
ldlibrary: Path | None = ldlibrarystr and Path(ldlibrarystr)
6876
library: Path | None = librarystr and Path(librarystr)

0 commit comments

Comments
 (0)