From 129bfbb405aa958a34b83f91b603b5e8beeb4a8c Mon Sep 17 00:00:00 2001 From: Tim Jenness Date: Mon, 20 Nov 2023 10:33:28 -0700 Subject: [PATCH 1/6] Enable python 3.12 in action --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index bec239f..d1f5d12 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v3 From 9c64ba57cede72b7beba311c2dd9e923c9f24e34 Mon Sep 17 00:00:00 2001 From: Tim Jenness Date: Mon, 20 Nov 2023 10:54:29 -0700 Subject: [PATCH 2/6] Put caching lines in correct place --- .github/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d1f5d12..b646705 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -44,13 +44,13 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 - cache: "pip" - cache-dependency-path: "setup.cfg" - name: Set up Python uses: actions/setup-python@v4 with: python-version: 3.8 + cache: "pip" + cache-dependency-path: "setup.cfg" - name: Install dependencies run: | From ab0e8d891d3ec79b615bfcb42593f5eee8a8c9d4 Mon Sep 17 00:00:00 2001 From: Tim Jenness Date: Mon, 20 Nov 2023 10:56:36 -0700 Subject: [PATCH 3/6] Remove pin from setuptools python 3.12 requires newer version of setuptools. --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0b0052e..7025159 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] requires = [ - "setuptools<65", + "setuptools", "lsst-versions >= 1.3.0", "wheel", "pybind11 >= 2.5.0", From 74df411a7843a77c81f32a602d053c110353df11 Mon Sep 17 00:00:00 2001 From: Tim Jenness Date: Mon, 20 Nov 2023 11:15:38 -0700 Subject: [PATCH 4/6] Use pybind11 helper for parallel builds This replaces the numpy.distutils hack that is no longer supported in python 3.12. --- setup.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index e96aa88..fa4edf7 100644 --- a/setup.py +++ b/setup.py @@ -11,11 +11,12 @@ import glob -# Importing this automatically enables parallelized builds -import numpy.distutils.ccompiler # noqa: F401 -from pybind11.setup_helpers import Pybind11Extension, build_ext +from pybind11.setup_helpers import ParallelCompile, Pybind11Extension, build_ext from setuptools import setup +# Optional multithreaded build. +ParallelCompile("NPY_NUM_BUILD_JOBS").install() + # Find the source code -- we can combine it into a single module pybind_src = sorted(glob.glob("python/lsst/sphgeom/*.cc")) cpp_src = sorted(glob.glob("src/*.cc")) From d90aeba36a2fb88c01a6ceb2bddb5c95290ba389 Mon Sep 17 00:00:00 2001 From: Tim Jenness Date: Mon, 20 Nov 2023 11:31:19 -0700 Subject: [PATCH 5/6] Add python 3.12 to cibuildwheel --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index b646705..f7cce0d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -72,7 +72,7 @@ jobs: needs: [build_and_test] if: startsWith(github.ref, 'refs/tags/') env: - CIBW_BUILD: "cp3{8,9,10,11}-{manylinux_x86_64,manylinux_aarch64,macosx_arm64,macosx_x86_64}" + CIBW_BUILD: "cp3{8,9,10,11,12}-{manylinux_x86_64,manylinux_aarch64,macosx_arm64,macosx_x86_64}" CIBW_ARCHS_MACOS: "x86_64 arm64" # use line below to enable aarch64 builds # CIBW_ARCHS_LINUX: "auto aarch64" From cf07efff9fa4e274323825558dff7811449a4ddb Mon Sep 17 00:00:00 2001 From: Tim Jenness Date: Mon, 20 Nov 2023 11:34:07 -0700 Subject: [PATCH 6/6] Fix warning from --- at top of file --- .github/workflows/rebase_checker.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/rebase_checker.yaml b/.github/workflows/rebase_checker.yaml index 62aeca7..65516d9 100644 --- a/.github/workflows/rebase_checker.yaml +++ b/.github/workflows/rebase_checker.yaml @@ -1,4 +1,3 @@ ---- name: Check that 'main' is not merged into the development branch on: pull_request