From a6c84bfd0fe7a3d70d8daae33567e7f9fe06ae61 Mon Sep 17 00:00:00 2001 From: Cristian Le Date: Mon, 19 Aug 2024 14:47:37 +0200 Subject: [PATCH 1/8] Add CI for python 3.13 Signed-off-by: Cristian Le --- .github/workflows/ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1be5cf7b..3127a55d 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 From 20db5a527537ba4c14d09a62afd9122d7121a3e0 Mon Sep 17 00:00:00 2001 From: Cristian Le Date: Mon, 19 Aug 2024 14:53:01 +0200 Subject: [PATCH 2/8] Add CI for python 3.13 to docs Signed-off-by: Cristian Le --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3127a55d..22d94d76 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -324,6 +324,7 @@ jobs: fail-fast: false matrix: runs-on: [ubuntu-latest, macos-14, windows-latest] + python-version: ["3.11", "3.13"] runs-on: ${{ matrix.runs-on }} timeout-minutes: 15 @@ -334,7 +335,7 @@ jobs: - uses: wntrblm/nox@2024.04.15 with: - python-versions: "3.11" + python-versions: ${{ matrix.python-version }} - name: Linkcheck run: nox -s docs -- -b linkcheck From e8fc11b0f3d04b833e36fe5946142f071c13e0fb Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Mon, 19 Aug 2024 13:09:41 -0400 Subject: [PATCH 3/8] tests: print some paths --- tests/packages/abi3_pyproject_ext/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/packages/abi3_pyproject_ext/CMakeLists.txt b/tests/packages/abi3_pyproject_ext/CMakeLists.txt index 9deb08e6..0ac2e72c 100644 --- a/tests/packages/abi3_pyproject_ext/CMakeLists.txt +++ b/tests/packages/abi3_pyproject_ext/CMakeLists.txt @@ -11,6 +11,8 @@ find_package( REQUIRED) if(NOT "${SKBUILD_SABI_COMPONENT}" STREQUAL "") + include(CMakePrintHelpers) + cmake_print_variables(Python_SABI_LIBRARY Python_SOSABI Python_SABI_LIBRARIES Python_SABI_LIBRARY_DIRS Python_RUNTIME_SABI_LIBRARY_DIRS) python_add_library(abi3_example MODULE abi3_example.c WITH_SOABI USE_SABI 3.7) else() python_add_library(abi3_example MODULE abi3_example.c WITH_SOABI) From 65b1a07779c7281ac2cb239292e225d3c55b1acd Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 19 Aug 2024 17:10:04 +0000 Subject: [PATCH 4/8] style: pre-commit fixes --- tests/packages/abi3_pyproject_ext/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/packages/abi3_pyproject_ext/CMakeLists.txt b/tests/packages/abi3_pyproject_ext/CMakeLists.txt index 0ac2e72c..d38c3ece 100644 --- a/tests/packages/abi3_pyproject_ext/CMakeLists.txt +++ b/tests/packages/abi3_pyproject_ext/CMakeLists.txt @@ -12,7 +12,9 @@ find_package( if(NOT "${SKBUILD_SABI_COMPONENT}" STREQUAL "") include(CMakePrintHelpers) - cmake_print_variables(Python_SABI_LIBRARY Python_SOSABI Python_SABI_LIBRARIES Python_SABI_LIBRARY_DIRS Python_RUNTIME_SABI_LIBRARY_DIRS) + cmake_print_variables( + Python_SABI_LIBRARY Python_SOSABI Python_SABI_LIBRARIES + Python_SABI_LIBRARY_DIRS Python_RUNTIME_SABI_LIBRARY_DIRS) python_add_library(abi3_example MODULE abi3_example.c WITH_SOABI USE_SABI 3.7) else() python_add_library(abi3_example MODULE abi3_example.c WITH_SOABI) From a29f4730fe1697143820c4241c0101bf8f680647 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Mon, 19 Aug 2024 15:22:30 -0400 Subject: [PATCH 5/8] Update sysconfig.py --- src/scikit_build_core/builder/sysconfig.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/scikit_build_core/builder/sysconfig.py b/src/scikit_build_core/builder/sysconfig.py index 6ac3b688..1f3de353 100644 --- a/src/scikit_build_core/builder/sysconfig.py +++ b/src/scikit_build_core/builder/sysconfig.py @@ -62,7 +62,13 @@ 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) From fe25f3daedca458982b13f2ce72611f42f64d955 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 19 Aug 2024 19:22:56 +0000 Subject: [PATCH 6/8] style: pre-commit fixes --- src/scikit_build_core/builder/sysconfig.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/scikit_build_core/builder/sysconfig.py b/src/scikit_build_core/builder/sysconfig.py index 1f3de353..47aa6442 100644 --- a/src/scikit_build_core/builder/sysconfig.py +++ b/src/scikit_build_core/builder/sysconfig.py @@ -65,7 +65,9 @@ def get_python_library(env: Mapping[str, str], *, abi3: bool = False) -> Path | librarystr = sysconfig.get_config_var("LIBRARY") if abi3: if ldlibrarystr is not None: - ldlibrarystr = ldlibrarystr.replace(f"python3{sys.version_info[1]}", "python3") + 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") From ac75d631cd5e047722bc4cf5800ba124d4d565a2 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Mon, 19 Aug 2024 15:57:50 -0400 Subject: [PATCH 7/8] Update ci.yml --- .github/workflows/ci.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 22d94d76..fa954db7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -323,8 +323,7 @@ jobs: strategy: fail-fast: false matrix: - runs-on: [ubuntu-latest, macos-14, windows-latest] - python-version: ["3.11", "3.13"] + runs-on: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.runs-on }} timeout-minutes: 15 @@ -335,7 +334,7 @@ jobs: - uses: wntrblm/nox@2024.04.15 with: - python-versions: ${{ matrix.python-version }} + python-versions: "3.12" - name: Linkcheck run: nox -s docs -- -b linkcheck From d130641dfb8a7388f569143c9b0d1fe211bd83a6 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Mon, 19 Aug 2024 17:35:26 -0400 Subject: [PATCH 8/8] Update tests/packages/abi3_pyproject_ext/CMakeLists.txt --- tests/packages/abi3_pyproject_ext/CMakeLists.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tests/packages/abi3_pyproject_ext/CMakeLists.txt b/tests/packages/abi3_pyproject_ext/CMakeLists.txt index d38c3ece..9deb08e6 100644 --- a/tests/packages/abi3_pyproject_ext/CMakeLists.txt +++ b/tests/packages/abi3_pyproject_ext/CMakeLists.txt @@ -11,10 +11,6 @@ find_package( REQUIRED) if(NOT "${SKBUILD_SABI_COMPONENT}" STREQUAL "") - include(CMakePrintHelpers) - cmake_print_variables( - Python_SABI_LIBRARY Python_SOSABI Python_SABI_LIBRARIES - Python_SABI_LIBRARY_DIRS Python_RUNTIME_SABI_LIBRARY_DIRS) python_add_library(abi3_example MODULE abi3_example.c WITH_SOABI USE_SABI 3.7) else() python_add_library(abi3_example MODULE abi3_example.c WITH_SOABI)