From 8e562e89fcaebbc462f84769d8d8cae1d3b124fd Mon Sep 17 00:00:00 2001 From: sameeul Date: Mon, 8 Jul 2024 22:15:08 -0400 Subject: [PATCH 1/3] Replace distutils module --- src/python/CMakeLists.txt | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/python/CMakeLists.txt b/src/python/CMakeLists.txt index 38874fe..dd38782 100644 --- a/src/python/CMakeLists.txt +++ b/src/python/CMakeLists.txt @@ -119,15 +119,10 @@ add_subdirectory(lib) # Find the python install dir IF(NOT DEFINED PYTHON_MODULE_INSTALL_DIR OR PYTHON_MODULE_INSTALL_DIR MATCHES "^$") - + execute_process( COMMAND "${PYTHON_EXECUTABLE}" -c - "from __future__ import print_function; from distutils import sysconfig as sc; print(sc.get_python_lib(prefix='', plat_specific=True))" - OUTPUT_VARIABLE PYTHON_SITE - OUTPUT_STRIP_TRAILING_WHITESPACE) - - execute_process( - COMMAND "${PYTHON_EXECUTABLE}" -c "from __future__ import print_function; from distutils.sysconfig import get_python_lib; print(get_python_lib())" + "from __future__ import print_function; import sysconfig; print(sysconfig.get_path('platlib'))" OUTPUT_VARIABLE PYTHON_SITE OUTPUT_STRIP_TRAILING_WHITESPACE) From d4293c858f893c36b4c7dbe4e11e253d1bdc51fc Mon Sep 17 00:00:00 2001 From: sameeul Date: Mon, 8 Jul 2024 22:33:23 -0400 Subject: [PATCH 2/3] Add Python 3.12 build --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 626c12a..0acd5d7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,7 @@ jobs: fail-fast: false matrix: os: [macos-latest, windows-latest, ubuntu-latest] - python-version: ['3.9', '3.10', '3.11'] + python-version: ['3.9', '3.10', '3.11', '3.12'] steps: - name: Checkout From 4e99b9ee53b9a533d5714a932ffac057a7c62388 Mon Sep 17 00:00:00 2001 From: sameeul Date: Mon, 8 Jul 2024 22:42:07 -0400 Subject: [PATCH 3/3] Use correct Python version in mamba build env, update xsimd constrain --- .github/workflows/build.yml | 2 ++ .github/workflows/environment.yaml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0acd5d7..a4a8f72 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,6 +32,8 @@ jobs: uses: mamba-org/setup-micromamba@v1 with: environment-file: .github/workflows/environment.yaml + create-args: >- + python=${{ matrix.python-version }} - name: Build unix if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' diff --git a/.github/workflows/environment.yaml b/.github/workflows/environment.yaml index c33a850..2ef73b7 100644 --- a/.github/workflows/environment.yaml +++ b/.github/workflows/environment.yaml @@ -10,7 +10,7 @@ dependencies: - zlib - xtensor >=0.24,<0.25 - xtensor-python >=0.26,<0.27 - - xsimd >=8,<9 + - xsimd >=10,<11 - blosc - imageio - nlohmann_json