diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1be5cf7b..fa954db7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,7 +49,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.7", "pypy-3.9", "3.12"] + python-version: ["3.7", "pypy-3.9", "3.12", "3.13"] runs-on: [ubuntu-latest, macos-13] cmake-version: ["3.15.x"] @@ -93,6 +93,9 @@ jobs: - python-version: "3.12" runs-on: windows-latest cmake-version: "3.26.x" + - python-version: "3.13" + runs-on: windows-latest + cmake-version: "3.26.x" steps: - uses: actions/checkout@v4 @@ -320,7 +323,7 @@ jobs: strategy: fail-fast: false matrix: - runs-on: [ubuntu-latest, macos-14, windows-latest] + runs-on: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.runs-on }} timeout-minutes: 15 @@ -331,7 +334,7 @@ jobs: - uses: wntrblm/nox@2024.04.15 with: - python-versions: "3.11" + python-versions: "3.12" - name: Linkcheck run: nox -s docs -- -b linkcheck diff --git a/src/scikit_build_core/builder/sysconfig.py b/src/scikit_build_core/builder/sysconfig.py index 6ac3b688..47aa6442 100644 --- a/src/scikit_build_core/builder/sysconfig.py +++ b/src/scikit_build_core/builder/sysconfig.py @@ -62,7 +62,15 @@ def get_python_library(env: Mapping[str, str], *, abi3: bool = False) -> Path | libdirstr = sysconfig.get_config_var("LIBDIR") ldlibrarystr = sysconfig.get_config_var("LDLIBRARY") - librarystr = sysconfig.get_config_var("LDLIBRARY") + librarystr = sysconfig.get_config_var("LIBRARY") + if abi3: + if ldlibrarystr is not None: + ldlibrarystr = ldlibrarystr.replace( + f"python3{sys.version_info[1]}", "python3" + ) + if librarystr is not None: + librarystr = librarystr.replace(f"python3{sys.version_info[1]}", "python3") + libdir: Path | None = libdirstr and Path(libdirstr) ldlibrary: Path | None = ldlibrarystr and Path(ldlibrarystr) library: Path | None = librarystr and Path(librarystr)