From c7a7f23e7b5947f39218685f9fb0bb83d16e003e Mon Sep 17 00:00:00 2001 From: Howard Butler Date: Tue, 7 Jul 2026 08:55:40 -0500 Subject: [PATCH 1/6] catch up to new scikit-build-core --- CMakeLists.txt | 2 +- README.rst | 4 ++-- pyproject.toml | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9a1357c..b124dd8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.13.0) +cmake_minimum_required(VERSION 3.15.0) project(pdal-python-plugins VERSION ${SKBUILD_PROJECT_VERSION} DESCRIPTION "PDAL Python Plugins" HOMEPAGE_URL "https://github.com/PDAL/python-plugins") diff --git a/README.rst b/README.rst index 8c5fda7..f083f0c 100644 --- a/README.rst +++ b/README.rst @@ -5,8 +5,8 @@ PDAL Python Plugins PDAL Python plugins allow you to process data with PDAL into `Numpy `__ arrays. They support embedding Python in PDAL pipelines with the -`readers.numpy `__ and -`filters.python `__ stages. +`readers.numpy `__ and +`filters.python `__ stages. Installation -------------------------------------------------------------------------------- diff --git a/pyproject.toml b/pyproject.toml index b57762e..97dfc10 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,7 +29,7 @@ dependencies = [ "numpy >= 1.22" ] -version="1.6.6" +version="1.6.7" [project.optional-dependencies] test = [ ] @@ -39,8 +39,8 @@ package-dir = {"" = "src"} zip-safe = false [project.urls] -homepage = "https://pdal.io" -documentation = "https://pdal.io" +homepage = "https://pdal.org" +documentation = "https://pdal.org" repository = "https://github.com/PDAL/python-plugins" changelog = "https://github.com/PDAL/python-plugins/blob/main/README.rst" @@ -62,7 +62,7 @@ sdist.include = [ "src", "CMakeLists.txt" ] -cmake.verbose = true +build.verbose = true logging.level = "INFO" #[tool.scikit-build.cmake.define] From 97faa212285c6da4d2405668c57042d416328e83 Mon Sep 17 00:00:00 2001 From: Howard Butler Date: Tue, 7 Jul 2026 09:00:10 -0500 Subject: [PATCH 2/6] align PDAL dep with pdal-python --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b124dd8..be10b35 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,8 +15,8 @@ set(Python3_FIND_FRAMEWORK "LAST") find_package(Python3 COMPONENTS Interpreter Development.Module Development.Embed NumPy REQUIRED) -# find PDAL. Require 2.1+ -find_package(PDAL 2.6 REQUIRED) +# find PDAL. +find_package(PDAL 2.7 REQUIRED) # Taken and adapted from PDAL's cmake macros.cmake From 683f815f80df794d8ee8fdb371412894891f82d7 Mon Sep 17 00:00:00 2001 From: Howard Butler Date: Tue, 7 Jul 2026 09:02:20 -0500 Subject: [PATCH 3/6] drop JsonFwd --- src/pdal/filters/PythonFilter.hpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pdal/filters/PythonFilter.hpp b/src/pdal/filters/PythonFilter.hpp index 19f3d03..7ee45ff 100644 --- a/src/pdal/filters/PythonFilter.hpp +++ b/src/pdal/filters/PythonFilter.hpp @@ -35,7 +35,6 @@ #pragma once #include -#include #include "../plang/Invocation.hpp" From 53c61712c8563b76a5409a0e733f88b0e1f3c0f0 Mon Sep 17 00:00:00 2001 From: Howard Butler Date: Tue, 7 Jul 2026 11:41:22 -0500 Subject: [PATCH 4/6] convert to using uv --- .github/environment.yml | 3 +- .github/workflows/build.yml | 17 ++++++++---- .github/workflows/release.yml | 13 ++++++--- .gitignore | 4 +++ README.rst | 52 ++++++++++++++++++++++++++++++++--- pyproject.toml | 12 ++++++++ 6 files changed, 85 insertions(+), 16 deletions(-) diff --git a/.github/environment.yml b/.github/environment.yml index 5663558..0338746 100644 --- a/.github/environment.yml +++ b/.github/environment.yml @@ -7,8 +7,7 @@ dependencies: - libpdal-core - compilers - python - - pip - - scikit-build-core - pybind11 - cmake - ninja + - uv diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 661d682..63b16af 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,6 +36,11 @@ jobs: - name: Check out uses: actions/checkout@v4 + - name: Install uv + uses: astral-sh/setup-uv@v8 + with: + enable-cache: true + - name: Setup micromamba uses: conda-incubator/setup-miniconda@v3 with: @@ -49,12 +54,14 @@ jobs: - name: Install Numpy ${{ matrix.numpy-version }} shell: bash -l {0} run: | - mamba install numpy=${{ matrix.numpy-version }} + PYTHON=$(python -c 'import sys; print(sys.executable)') + uv pip install --python "$PYTHON" --reinstall "numpy==${{ matrix.numpy-version }}.*" - name: Install shell: bash -l {0} run: | - pip install . -Ccmake.define.WITH_TESTS=ON . + PYTHON=$(python -c 'import sys; print(sys.executable)') + uv pip install --python "$PYTHON" --no-build-isolation -Ccmake.define.WITH_TESTS=ON . - name: Test Unix shell: bash -l {0} @@ -76,8 +83,8 @@ jobs: run: | sudo apt-get update -y sudo apt-get install pkg-config libssl-dev -y - python -m pip install build pipx twine - pipx run build --sdist -Ccmake.define.CMAKE_BUILD_WITH_INSTALL_RPATH=ON + PYTHON=$(python -c 'import sys; print(sys.executable)') + uv build --python "$PYTHON" --sdist -Ccmake.define.CMAKE_BUILD_WITH_INSTALL_RPATH=ON - name: Test Windows if: matrix.os == 'windows-latest' @@ -93,5 +100,3 @@ jobs: pdal --drivers $PDAL_DRIVER_PATH/pdal_filters_python_test$EXT $PDAL_DRIVER_PATH/pdal_io_numpy_test$EXT - - diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 80ea68c..5e5623f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,7 +22,12 @@ jobs: fail-fast: true steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + - name: Install uv + uses: astral-sh/setup-uv@v8 + with: + enable-cache: true + - name: Setup micromamba uses: conda-incubator/setup-miniconda@v3 with: @@ -33,11 +38,11 @@ jobs: auto-update-conda: true environment-file: .github/environment.yml - - name: Install dependencies + - name: Build source distribution shell: bash -l {0} run: | - python -m pip install build pipx twine - pipx run build --sdist -Ccmake.define.CMAKE_BUILD_WITH_INSTALL_RPATH=ON + PYTHON=$(python -c 'import sys; print(sys.executable)') + uv build --python "$PYTHON" --sdist -Ccmake.define.CMAKE_BUILD_WITH_INSTALL_RPATH=ON - name: Publish package distributions to PyPI if: github.event_name == 'release' && github.event.action == 'published' diff --git a/.gitignore b/.gitignore index 98c8507..37e77af 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,11 @@ .vscode/ +.venv/ _skbuild/ MANIFEST +build/ +build-*/ dist/ +wheels/ *.egg-info/ *.o *.so diff --git a/README.rst b/README.rst index f083f0c..c75fe03 100644 --- a/README.rst +++ b/README.rst @@ -6,7 +6,7 @@ PDAL Python plugins allow you to process data with PDAL into `Numpy `__ arrays. They support embedding Python in PDAL pipelines with the `readers.numpy `__ and -`filters.python `__ stages. +`filters.python `__ stages. Installation -------------------------------------------------------------------------------- @@ -18,7 +18,9 @@ PDAL Python plugins are installable via PyPI: .. code-block:: - pip install pdal-plugins + uv pip install pdal-plugins + +If you are not using uv, :code:`pip install pdal-plugins` works too. GitHub ................................................................................ @@ -33,5 +35,47 @@ Requirements * PDAL 2.6+ * Python >=3.9 -* Numpy (eg :code:`pip install numpy`) -* scikit-build-core (eg :code:`pip install scikit-build-core`) +* uv +* Numpy +* scikit-build-core +* pybind11 +* CMake and Ninja + +Development +================================================================================ + +The project uses uv for Python package installation and builds, with +scikit-build-core driving the CMake build. + +Create a development environment with the same dependencies used by CI: + +.. code-block:: bash + + mamba env create -f .github/environment.yml + mamba activate test + +Install the plugins into that environment and build the C++ tests: + +.. code-block:: bash + + PYTHON=$(python -c 'import sys; print(sys.executable)') + uv pip install --python "$PYTHON" --no-build-isolation -Ccmake.define.WITH_TESTS=ON . + +Run the tests from the scikit-build output directory: + +.. code-block:: bash + + export PYTHONHOME=$CONDA_PREFIX + export PATH=$CONDA_PREFIX/bin:$PATH + export WHEEL_DIR=$(python -m scikit_build_core.builder.wheel_tag) + export PDAL_DRIVER_PATH=$(pwd)/build/$WHEEL_DIR/Release + pdal --drivers + $PDAL_DRIVER_PATH/pdal_filters_python_test + $PDAL_DRIVER_PATH/pdal_io_numpy_test + +Build source and wheel distributions with uv: + +.. code-block:: bash + + PYTHON=$(python -c 'import sys; print(sys.executable)') + uv build --python "$PYTHON" diff --git a/pyproject.toml b/pyproject.toml index 97dfc10..5dc77a9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,6 +22,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Topic :: Scientific/Engineering :: GIS", ] @@ -34,6 +35,17 @@ version="1.6.7" [project.optional-dependencies] test = [ ] +[dependency-groups] +build = [ + "numpy >= 1.22", + "pybind11[global]", + "scikit-build-core", +] +test = [ ] + +[tool.uv] +package = true + [tool.setuptools] package-dir = {"" = "src"} zip-safe = false From 65822adebdadc54d7a1b3e815b933e29b917de15 Mon Sep 17 00:00:00 2001 From: Howard Butler Date: Tue, 7 Jul 2026 11:45:47 -0500 Subject: [PATCH 5/6] advertise 3.14 too --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 5dc77a9..2b3ddfe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,6 +23,7 @@ classifiers = [ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Topic :: Scientific/Engineering :: GIS", ] From 857100417b9cc5f7143e10ba5faf5890eb511ea3 Mon Sep 17 00:00:00 2001 From: Howard Butler Date: Tue, 7 Jul 2026 12:13:22 -0500 Subject: [PATCH 6/6] set uv action pin --- .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 63b16af..3186f80 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -37,7 +37,7 @@ jobs: uses: actions/checkout@v4 - name: Install uv - uses: astral-sh/setup-uv@v8 + uses: astral-sh/setup-uv@v8.3.1 with: enable-cache: true