From 33711c28051440eb3122fe9edf1eb860c61a9033 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Thu, 1 Jun 2023 10:02:17 -0400 Subject: [PATCH 01/20] ci: enable Win ARM Signed-off-by: Henry Schreiner --- .github/workflows/wheels.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index be35ece..764debc 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -48,6 +48,9 @@ jobs: # Cross-compile on macOS CIBW_ARCHS_MACOS: x86_64 arm64 + # Cross-compile on Win + CIBW_ARCHS_WIN: AMD64 ARM64 + # Temporary: use pre-release Python 3.12 for stable ABI builds CIBW_PRERELEASE_PYTHONS: True From 578efe0178c1103467a941860d64dd4c91598eb5 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Thu, 1 Jun 2023 11:15:34 -0400 Subject: [PATCH 02/20] Update .github/workflows/wheels.yml --- .github/workflows/wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 764debc..8419a52 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -49,7 +49,7 @@ jobs: CIBW_ARCHS_MACOS: x86_64 arm64 # Cross-compile on Win - CIBW_ARCHS_WIN: AMD64 ARM64 + CIBW_ARCHS_WINDOWS: AMD64 ARM64 # Temporary: use pre-release Python 3.12 for stable ABI builds CIBW_PRERELEASE_PYTHONS: True From aefe9ed76d8e1c8f732e26c5bb38f24105a3a232 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Thu, 1 Jun 2023 12:14:59 -0400 Subject: [PATCH 03/20] Update wheels.yml --- .github/workflows/wheels.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 8419a52..e1bcf8d 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -53,6 +53,10 @@ jobs: # Temporary: use pre-release Python 3.12 for stable ABI builds CIBW_PRERELEASE_PYTHONS: True + + # Debugging + CMAKE_VERBOSE_MAKEFILE: 1 + FORCE_COLOR: 3 - name: Verify clean directory run: git diff --exit-code From d8249539476bf09d732102cfbdae1a13cb03cb4f Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Thu, 1 Jun 2023 12:40:38 -0400 Subject: [PATCH 04/20] Update wheels.yml --- .github/workflows/wheels.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index e1bcf8d..0523a70 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -10,6 +10,9 @@ on: types: - published +env: + FORCE_COLOR: 3 + jobs: build_sdist: name: Build SDist @@ -55,8 +58,7 @@ jobs: CIBW_PRERELEASE_PYTHONS: True # Debugging - CMAKE_VERBOSE_MAKEFILE: 1 - FORCE_COLOR: 3 + SKBUILD_CMAKE_VERBOSE: 1 - name: Verify clean directory run: git diff --exit-code From 4c6fd2ce655e2aba48db3ba0c74f42c646f05944 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Thu, 1 Jun 2023 14:12:45 -0400 Subject: [PATCH 05/20] Update CMakeLists.txt --- CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index af8ce44..e2fc6ee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,8 +27,7 @@ endif() # Try to import all Python components potentially needed by nanobind find_package(Python 3.8 - REQUIRED COMPONENTS Interpreter Development.Module - OPTIONAL_COMPONENTS Development.SABIModule) + REQUIRED COMPONENTS Interpreter Development.Module ${SKBUILD_SABI_COMPONENT}) # Import nanobind through CMake's find_package mechanism find_package(nanobind CONFIG REQUIRED) From 928feacedbbfafe57e38695d341fc47535fd0fc2 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Fri, 2 Jun 2023 00:36:29 -0400 Subject: [PATCH 06/20] Update pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ee0d3ac..b89bb06 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["scikit-build-core >=0.4.3", "nanobind >=1.3.2"] +requires = ["scikit-build-core >=0.4.4", "nanobind >=1.3.2"] build-backend = "scikit_build_core.build" [project] From 47e925b5a2a4ecb3f302f8b722fbf607202b055c Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Fri, 2 Jun 2023 00:59:29 -0400 Subject: [PATCH 07/20] Update wheels.yml --- .github/workflows/wheels.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 0523a70..f3b9393 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -39,7 +39,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: [windows-latest] steps: - uses: actions/checkout@v3 @@ -48,6 +48,8 @@ jobs: - uses: pypa/cibuildwheel@v2.13.0 env: + CIBW_BUILD: cp311-* cp312-* + # Cross-compile on macOS CIBW_ARCHS_MACOS: x86_64 arm64 @@ -59,6 +61,7 @@ jobs: # Debugging SKBUILD_CMAKE_VERBOSE: 1 + SKBUILD_LOGGING_LEVEL: debug - name: Verify clean directory run: git diff --exit-code From 850e07e58e3bc103a482939d63eeb0e399e3b26b Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Fri, 2 Jun 2023 01:13:43 -0400 Subject: [PATCH 08/20] Update wheels.yml --- .github/workflows/wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index f3b9393..34d5269 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -61,7 +61,7 @@ jobs: # Debugging SKBUILD_CMAKE_VERBOSE: 1 - SKBUILD_LOGGING_LEVEL: debug + SKBUILD_LOGGING_LEVEL: DEBUG - name: Verify clean directory run: git diff --exit-code From d86b37a671bf48797b82cbf982e5157a1d8f6ef8 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Fri, 2 Jun 2023 01:31:16 -0400 Subject: [PATCH 09/20] Apply suggestions from code review --- .github/workflows/wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 34d5269..afcaf51 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -54,7 +54,7 @@ jobs: CIBW_ARCHS_MACOS: x86_64 arm64 # Cross-compile on Win - CIBW_ARCHS_WINDOWS: AMD64 ARM64 + CIBW_ARCHS_WINDOWS: ARM64 # Temporary: use pre-release Python 3.12 for stable ABI builds CIBW_PRERELEASE_PYTHONS: True From 20a670a70b7cd43df8d41f941cee35f0e265582d Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Fri, 2 Jun 2023 15:19:19 -0400 Subject: [PATCH 10/20] fix: try nanobind branch Signed-off-by: Henry Schreiner --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b89bb06..df9cd56 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["scikit-build-core >=0.4.4", "nanobind >=1.3.2"] +requires = ["scikit-build-core >=0.4.4", "nanobind @ git+https://github.com/henryiii/nanobind@henryiii/fix/suffix"] build-backend = "scikit_build_core.build" [project] From b1118d2d7379b1fdd8d8b4a2ab6524d92c0d88b2 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Fri, 2 Jun 2023 17:22:50 -0400 Subject: [PATCH 11/20] fix: try cross compile branch Signed-off-by: Henry Schreiner --- pyproject.toml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index df9cd56..b5cc495 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,7 @@ [build-system] -requires = ["scikit-build-core >=0.4.4", "nanobind @ git+https://github.com/henryiii/nanobind@henryiii/fix/suffix"] +requires = [ + "scikit-build-core @ git+https://github.com/scikit-build/scikit-build-core@henryiii/fix/crosscompile", + "nanobind @ git+https://github.com/henryiii/nanobind@henryiii/fix/suffix"] build-backend = "scikit_build_core.build" [project] From c478eb0090aa07852996521a31400113e6caac7e Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Fri, 2 Jun 2023 19:17:02 -0400 Subject: [PATCH 12/20] Update CMakeLists.txt --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index e2fc6ee..cca2a29 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,6 +32,9 @@ find_package(Python 3.8 # Import nanobind through CMake's find_package mechanism find_package(nanobind CONFIG REQUIRED) +include(CMakePrintHelperes) +cmake_print_variables(Python_SOABI NB_EXT_SUFFIX) + # We are now ready to compile the actual extension module nanobind_add_module( # Name of the extension From 2d6590e482e2daca3cf265fbcc5d965a0cc3fdab Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Fri, 2 Jun 2023 19:25:24 -0400 Subject: [PATCH 13/20] Update CMakeLists.txt --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cca2a29..0217c20 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,7 +32,7 @@ find_package(Python 3.8 # Import nanobind through CMake's find_package mechanism find_package(nanobind CONFIG REQUIRED) -include(CMakePrintHelperes) +include(CMakePrintHelpers) cmake_print_variables(Python_SOABI NB_EXT_SUFFIX) # We are now ready to compile the actual extension module From 3d62ee4b9d8c3fcaadc19145b0b0cac29d390032 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Fri, 2 Jun 2023 21:34:02 -0400 Subject: [PATCH 14/20] Update CMakeLists.txt --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0217c20..ce10e2b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,7 +33,7 @@ find_package(Python 3.8 find_package(nanobind CONFIG REQUIRED) include(CMakePrintHelpers) -cmake_print_variables(Python_SOABI NB_EXT_SUFFIX) +cmake_print_variables(Python_SOABI SKBUILD_SOABI NB_SUFFIX) # We are now ready to compile the actual extension module nanobind_add_module( From aca4e8775fa9d472b82c1e935452962ce734c3a8 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Fri, 9 Jun 2023 18:27:50 -0400 Subject: [PATCH 15/20] Update pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b5cc495..d0888d2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [build-system] requires = [ "scikit-build-core @ git+https://github.com/scikit-build/scikit-build-core@henryiii/fix/crosscompile", - "nanobind @ git+https://github.com/henryiii/nanobind@henryiii/fix/suffix"] + "nanobind @ git+https://github.com/wjakob/nanobind@master"] build-backend = "scikit_build_core.build" [project] From bc7b5bace4a61d9e7f0f24c96fdce966d2b4aa2a Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Fri, 9 Jun 2023 18:46:56 -0400 Subject: [PATCH 16/20] Update CMakeLists.txt --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index ce10e2b..4162878 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,6 +25,9 @@ if (NOT SKBUILD) after editing C++ files.") endif() +message(STATUS "PYTHON_PATH: $ENV{PYTHON_PATH}") +message(STATUS "_PYTHON_SYSCONFIGDATA_NAME: $ENV{_PYTHON_SYSCONFIGDATA_NAME}") + # Try to import all Python components potentially needed by nanobind find_package(Python 3.8 REQUIRED COMPONENTS Interpreter Development.Module ${SKBUILD_SABI_COMPONENT}) @@ -32,6 +35,9 @@ find_package(Python 3.8 # Import nanobind through CMake's find_package mechanism find_package(nanobind CONFIG REQUIRED) +message(STATUS "PYTHON_PATH: $ENV{PYTHON_PATH}") +message(STATUS "_PYTHON_SYSCONFIGDATA_NAME: $ENV{_PYTHON_SYSCONFIGDATA_NAME}") + include(CMakePrintHelpers) cmake_print_variables(Python_SOABI SKBUILD_SOABI NB_SUFFIX) From 18154c6bedd42f44deb15b7365d129499f75eafd Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Fri, 9 Jun 2023 18:56:55 -0400 Subject: [PATCH 17/20] Update CMakeLists.txt --- CMakeLists.txt | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4162878..986c937 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,9 +25,18 @@ if (NOT SKBUILD) after editing C++ files.") endif() -message(STATUS "PYTHON_PATH: $ENV{PYTHON_PATH}") +include(CMakePrintHelpers) + +message(STATUS "PYTHONPATH: $ENV{PYTHON_PATH}") message(STATUS "_PYTHON_SYSCONFIGDATA_NAME: $ENV{_PYTHON_SYSCONFIGDATA_NAME}") +execute_process( + COMMAND "${Python_EXECUTABLE}" "-c" + "import sysconfig; print(sysconfig.get_config_var('EXT_SUFFIX'))" + OUTPUT_VARIABLE EXT_SUFFIX + OUTPUT_STRIP_TRAILING_WHITESPACE) +cmake_print_variables(EXT_SUFFIX) + # Try to import all Python components potentially needed by nanobind find_package(Python 3.8 REQUIRED COMPONENTS Interpreter Development.Module ${SKBUILD_SABI_COMPONENT}) @@ -35,10 +44,16 @@ find_package(Python 3.8 # Import nanobind through CMake's find_package mechanism find_package(nanobind CONFIG REQUIRED) -message(STATUS "PYTHON_PATH: $ENV{PYTHON_PATH}") +execute_process( + COMMAND "${Python_EXECUTABLE}" "-c" + "import sysconfig; print(sysconfig.get_config_var('EXT_SUFFIX'))" + OUTPUT_VARIABLE EXT_SUFFIX + OUTPUT_STRIP_TRAILING_WHITESPACE) +cmake_print_variables(EXT_SUFFIX) + +message(STATUS "PYTHONPATH: $ENV{PYTHON_PATH}") message(STATUS "_PYTHON_SYSCONFIGDATA_NAME: $ENV{_PYTHON_SYSCONFIGDATA_NAME}") -include(CMakePrintHelpers) cmake_print_variables(Python_SOABI SKBUILD_SOABI NB_SUFFIX) # We are now ready to compile the actual extension module From bd10d48a4f40515e9b1c8f0a993fafa5260ade1e Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Fri, 9 Jun 2023 21:31:21 -0400 Subject: [PATCH 18/20] Update CMakeLists.txt --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 986c937..da1d0e4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,7 +27,7 @@ endif() include(CMakePrintHelpers) -message(STATUS "PYTHONPATH: $ENV{PYTHON_PATH}") +message(STATUS "PYTHONPATH: $ENV{PYTHONPATH}") message(STATUS "_PYTHON_SYSCONFIGDATA_NAME: $ENV{_PYTHON_SYSCONFIGDATA_NAME}") execute_process( @@ -51,7 +51,7 @@ execute_process( OUTPUT_STRIP_TRAILING_WHITESPACE) cmake_print_variables(EXT_SUFFIX) -message(STATUS "PYTHONPATH: $ENV{PYTHON_PATH}") +message(STATUS "PYTHONPATH: $ENV{PYTHONPATH}") message(STATUS "_PYTHON_SYSCONFIGDATA_NAME: $ENV{_PYTHON_SYSCONFIGDATA_NAME}") cmake_print_variables(Python_SOABI SKBUILD_SOABI NB_SUFFIX) From b9ff38d6a8ece6b8348574719a8c037657d34430 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Sat, 10 Jun 2023 00:01:51 -0400 Subject: [PATCH 19/20] Update CMakeLists.txt --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index da1d0e4..f0143d4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,6 +51,13 @@ execute_process( OUTPUT_STRIP_TRAILING_WHITESPACE) cmake_print_variables(EXT_SUFFIX) +execute_process( + COMMAND "${Python_EXECUTABLE}" "-c" + "import sysconfig; print(sysconfig.get_config_var('SOABI'))" + OUTPUT_VARIABLE SOABI + OUTPUT_STRIP_TRAILING_WHITESPACE) +cmake_print_variables(SOABI) + message(STATUS "PYTHONPATH: $ENV{PYTHONPATH}") message(STATUS "_PYTHON_SYSCONFIGDATA_NAME: $ENV{_PYTHON_SYSCONFIGDATA_NAME}") From 3cfc257dcb3919c36a055c2b35036fa576c15881 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Wed, 21 Jun 2023 16:44:35 -0400 Subject: [PATCH 20/20] fix: try backport from CMake 3.27 Signed-off-by: Henry Schreiner --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d0888d2..8b76856 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] requires = [ - "scikit-build-core @ git+https://github.com/scikit-build/scikit-build-core@henryiii/fix/crosscompile", + "scikit-build-core @ git+https://github.com/scikit-build/scikit-build-core@henryiii/fix/backport327", "nanobind @ git+https://github.com/wjakob/nanobind@master"] build-backend = "scikit_build_core.build"