diff --git a/.github/environment.yml b/.github/environment.yml index d18b1d3a..348f6abd 100644 --- a/.github/environment.yml +++ b/.github/environment.yml @@ -2,11 +2,13 @@ name: testenv channels: - conda-forge dependencies: - - scikit-build-core - - numpy + - scikit-build-core >=1.0 + - numpy >=1.24 - compilers - - pybind11 + - ninja + - pybind11 >=2.12 - libpdal-core - - pytest - - meshio + - pytest >=8 + - meshio >=5.3 - geopandas + - uv diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fc69ec07..7f2c7ec9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,13 +24,15 @@ jobs: fail-fast: true matrix: os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] - python-version: ['3.10', '3.11', '3.12', '3.13'] - numpy-version: ['1.24', '2.1'] + python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] + numpy-version: ['2.2', '2.5'] exclude: - - python-version: '3.12' - numpy-version: '1.24' - - python-version: '3.13' - numpy-version: '1.24' + - python-version: '3.14' + numpy-version: '2.2' + - python-version: '3.11' + numpy-version: '2.5' + - python-version: '3.10' + numpy-version: '2.5' steps: - name: Check out python-pdal @@ -59,11 +61,12 @@ jobs: - name: Install python-pdal run: | - pip install -vv . --no-deps --no-build-isolation + uv pip install -vv . --no-deps - name: Install python-pdal-plugins working-directory: ./plugins - run: pip install -vv . --no-deps --no-build-isolation + run: | + uv pip install -vv . --no-deps --no-build-isolation - name: Test run: | @@ -75,4 +78,3 @@ jobs: python -m pdal pdal --drivers --debug python -m pytest -v test/ - diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 99b22df6..dfe8e86b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -44,11 +44,10 @@ jobs: auto-update-conda: true environment-file: .github/environment.yml - - name: Install dependencies + - name: Build sdist shell: bash -l {0} run: | - python -m pip install build pipx twine - pipx run build --sdist -Ccmake.define.CMAKE_BUILD_WITH_INSTALL_RPATH=ON + uv build --sdist - uses: actions/upload-artifact@v4 with: @@ -59,4 +58,3 @@ jobs: if: github.event_name == 'release' && github.event.action == 'published' uses: pypa/gh-action-pypi-publish@release/v1 - diff --git a/CMakeLists.txt b/CMakeLists.txt index 61610cfb..05c8961d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,7 +23,7 @@ endif() # find Python3 find_package(Python3 COMPONENTS Interpreter ${DEVELOPMENT_COMPONENT} NumPy REQUIRED) -# find PDAL. Require 2.1+ +# find PDAL. Require 2.7+ find_package(PDAL 2.7 REQUIRED) # find PyBind11 diff --git a/README.rst b/README.rst index ab90fd28..cb9bebbc 100644 --- a/README.rst +++ b/README.rst @@ -35,13 +35,12 @@ using `scikit-build-core `_ settings: --no-deps \ --no-build-isolation + GitHub ................................................................................ The repository for PDAL's Python extension is available at https://github.com/PDAL/python -Python support released independently from PDAL itself as of PDAL 1.7. - Usage -------------------------------------------------------------------------------- @@ -91,7 +90,7 @@ Stage Objects - A stage is an instance of ``pdal.Reader``, ``pdal.Filter`` or ``pdal.Writer``. - A stage can be instantiated by passing as keyword arguments the options applicable to the respective PDAL stage. For more on PDAL stages and their - options, check the PDAL documentation on `Stage Objects `__. + options, check the PDAL documentation on `Stage Objects `__. - The ``filename`` option of ``Readers`` and ``Writers`` as well as the ``type`` option of ``Filters`` can be passed positionally as the first argument. @@ -417,8 +416,8 @@ Method: #. read point cloud file #. remove noise #. clean up invalid values -#. classify ground points using `SMRF `__ -#. write with `GDAL writer `__ +#. classify ground points using `SMRF `__ +#. write with `GDAL writer `__ .. note:: If your pointcloud already has ground classified, you can skip all but the reader and writer and achieve the same result. @@ -479,11 +478,11 @@ Method: .. _`Numpy`: http://www.numpy.org/ -.. _`schema`: http://www.pdal.io/dimensions.html -.. _`metadata`: http://www.pdal.io/development/metadata.html +.. _`schema`: http://www.pdal.org/dimensions.html +.. _`metadata`: http://www.pdal.org/development/metadata.html .. _`TileDB`: https://tiledb.com/ .. _`TileDB-PDAL integration`: https://docs.tiledb.com/geospatial/pdal -.. _`TileDB writer plugin`: https://pdal.io/stages/writers.tiledb.html +.. _`TileDB writer plugin`: https://pdal.org/stages/writers.tiledb.html .. image:: https://github.com/PDAL/python/workflows/Build/badge.svg :target: https://github.com/PDAL/python/actions?query=workflow%3ABuild @@ -493,6 +492,6 @@ Requirements * PDAL 2.7+ * Python >=3.9 -* Pybind11 (eg :code:`pip install pybind11[global]`) -* Numpy >= 1.22 (eg :code:`pip install numpy`) -* scikit-build-core (eg :code:`pip install scikit-build-core`) +* Pybind11 >= 2.12 (eg :code:`pip install pybind11[global]`) +* Numpy >= 1.24 at runtime and >= 2.0 for isolated builds (eg :code:`pip install numpy`) +* scikit-build-core >= 1.0 (eg :code:`pip install scikit-build-core`) diff --git a/pyproject.toml b/pyproject.toml index e1b98235..52e0e6dd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,48 +22,76 @@ 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", ] dependencies = [ - "numpy >= 1.22" + "numpy >= 1.24" ] dynamic = ["version"] [project.optional-dependencies] test = [ - "pandas", - "meshio" + "geopandas", + "meshio >= 5.3", + "pandas >= 2", + "pytest >= 8", ] -[tool.setuptools] -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" changelog = "https://github.com/PDAL/python/blob/main/README.rst" [build-system] -requires = ["scikit-build-core >= 0.9", "numpy >= 1.22", "pybind11[global]"] +requires = [ + "scikit-build-core >= 1.0", + "numpy >= 2.0", + "pybind11[global] >= 2.12", +] build-backend = "scikit_build_core.build" [tool.scikit-build] +minimum-version = "build-system.requires" build-dir = "build/{wheel_tag}" -sdist.exclude = [".github"] -sdist.cmake = true +sdist.exclude = [ + ".github", + "**/__pycache__/**", + "**/*.pyc", +] +sdist.cmake = false +sdist.inclusion-mode = "explicit" cmake.build-type = "Release" sdist.include = [ + "CHANGES.txt", + "CMakeLists.txt", + "LICENSE.txt", + "pyproject.toml", + "README.rst", "src", - "CMakeLists.txt" +] +wheel.packages = ["src/pdal"] +wheel.exclude = [ + "pdal/*.cpp", + "pdal/*.hpp", + "pdal/export.hpp", + "**/__pycache__/**", + "**/*.pyc", ] build.verbose = false logging.level = "ERROR" -[tool.scikit-build.metadata.version] +[tool.uv] +no-build-isolation = true + +[tool.uv.pip] +no-build-isolation = true + +[[tool.dynamic-metadata]] provider = "scikit_build_core.metadata.regex" +field = "version" input = "src/pdal/__init__.py" diff --git a/setup.py.off b/setup.py.off deleted file mode 100644 index a3fd2a22..00000000 --- a/setup.py.off +++ /dev/null @@ -1,45 +0,0 @@ -from skbuild import setup - -# Get the version from the pdal module -with open("pdal/__init__.py", "r") as fp: - for line in fp: - if line.startswith("__version__"): - version = line.split("=")[1].strip().strip("\"'") - break - else: - raise ValueError("Could not determine Python package version") - -with open("README.rst", "r", encoding="utf-8") as fp: - readme = fp.read() - -with open("CHANGES.txt", "r", encoding="utf-8") as fp: - changes = fp.read() - -setup( - name="pdal", - version=version, - description="Point cloud data processing", - license="BSD", - keywords="point cloud spatial", - author="Howard Butler", - author_email="howard@hobu.co", - maintainer="Howard Butler", - maintainer_email="howard@hobu.co", - url="https://pdal.io", - long_description=readme + "\n\n" + changes, - long_description_content_type="text/x-rst", - packages=["pdal"], - install_requires=["numpy"], - classifiers=[ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Intended Audience :: Science/Research", - "License :: OSI Approved :: BSD License", - "Operating System :: OS Independent", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Topic :: Scientific/Engineering :: GIS", - ], -) diff --git a/src/pdal/__init__.py b/src/pdal/__init__.py index c67ab5e3..6a9c4b35 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.5.3' +__version__ = '3.5.4' from . import libpdalpython from .drivers import inject_pdal_drivers