diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 42c82a78..47180b8d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,7 +17,7 @@ defaults: jobs: build: - name: Build ${{ matrix.os }} py${{ matrix.python-version }} + name: ${{ matrix.os }} py${{ matrix.python-version }} numpy ${{ matrix.numpy-version }} runs-on: ${{ matrix.os }} strategy: @@ -25,6 +25,10 @@ jobs: matrix: os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] python-version: ['3.9', '3.10', '3.11', '3.12'] + numpy-version: ['1.24', '2.0'] + exclude: + - python-version: '3.12' + numpy-version: '1.24' steps: - name: Check out python-pdal @@ -47,6 +51,10 @@ jobs: auto-update-conda: true environment-file: .github/environment.yml + - name: Install numpy ${{ matrix.numpy-version }} + run: | + mamba install -y numpy=${{ matrix.numpy-version }} + - name: Install python-pdal run: | pip install -vv . --no-deps --no-build-isolation diff --git a/src/pdal/PyArray.cpp b/src/pdal/PyArray.cpp index d3521173..55f87b5d 100644 --- a/src/pdal/PyArray.cpp +++ b/src/pdal/PyArray.cpp @@ -90,6 +90,10 @@ std::string toString(PyObject *pname) } // unnamed namespace +#if NPY_ABI_VERSION < 0x02000000 + #define PyDataType_FIELDS(descr) ((descr)->fields) +#endif + Array::Array(PyArrayObject* array) : m_array(array), m_rowMajor(true) { Py_XINCREF(array); diff --git a/src/pdal/__init__.py b/src/pdal/__init__.py index 41b36121..a312f568 100644 --- a/src/pdal/__init__.py +++ b/src/pdal/__init__.py @@ -1,5 +1,5 @@ __all__ = ["Pipeline", "Stage", "Reader", "Filter", "Writer", "dimensions", "info"] -__version__ = '3.4.4' +__version__ = '3.4.5' from . import libpdalpython from .drivers import inject_pdal_drivers