Skip to content

Commit 5b853f0

Browse files
committed
use uv for build and test, update docs
1 parent 36417b4 commit 5b853f0

7 files changed

Lines changed: 73 additions & 37 deletions

File tree

‎.github/environment.yml‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@ name: testenv
22
channels:
33
- conda-forge
44
dependencies:
5-
- scikit-build-core
6-
- numpy
5+
- scikit-build-core >=1.0
6+
- numpy >=1.24
77
- compilers
8-
- pybind11
8+
- ninja
9+
- pybind11 >=2.12
910
- libpdal-core
10-
- pytest
11-
- meshio
11+
- pytest >=8
12+
- meshio >=5.3
1213
- geopandas
14+
- uv

‎.github/workflows/build.yml‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ jobs:
5959
6060
- name: Install python-pdal
6161
run: |
62-
pip install -vv . --no-deps --no-build-isolation
62+
uv pip install -vv . --no-deps
6363
6464
- name: Install python-pdal-plugins
6565
working-directory: ./plugins
66-
run: pip install -vv . --no-deps --no-build-isolation
66+
run: uv pip install -vv . --no-deps --no-build-isolation
6767

6868
- name: Test
6969
run: |
@@ -75,4 +75,3 @@ jobs:
7575
python -m pdal
7676
pdal --drivers --debug
7777
python -m pytest -v test/
78-

‎.github/workflows/release.yml‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,10 @@ jobs:
4444
auto-update-conda: true
4545
environment-file: .github/environment.yml
4646

47-
- name: Install dependencies
47+
- name: Build sdist
4848
shell: bash -l {0}
4949
run: |
50-
python -m pip install build pipx twine
51-
pipx run build --sdist -Ccmake.define.CMAKE_BUILD_WITH_INSTALL_RPATH=ON
50+
uv build --sdist
5251
5352
- uses: actions/upload-artifact@v4
5453
with:
@@ -59,4 +58,3 @@ jobs:
5958
if: github.event_name == 'release' && github.event.action == 'published'
6059
uses: pypa/gh-action-pypi-publish@release/v1
6160

62-

‎CMakeLists.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ endif()
2323
# find Python3
2424
find_package(Python3 COMPONENTS Interpreter ${DEVELOPMENT_COMPONENT} NumPy REQUIRED)
2525

26-
# find PDAL. Require 2.1+
26+
# find PDAL. Require 2.7+
2727
find_package(PDAL 2.7 REQUIRED)
2828

2929
# find PyBind11

‎README.rst‎

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,15 @@ using `scikit-build-core <https://scikit-build-core.readthedocs.io>`_ settings:
3535
--no-deps \
3636
--no-build-isolation
3737
38+
The project is also configured for uv builds that use the active conda
39+
environment for PDAL and build dependencies:
40+
41+
.. code-block::
42+
43+
conda activate pdal-python
44+
uv build
45+
uv pip install -e . --no-deps
46+
3847
GitHub
3948
................................................................................
4049

@@ -91,7 +100,7 @@ Stage Objects
91100
- A stage is an instance of ``pdal.Reader``, ``pdal.Filter`` or ``pdal.Writer``.
92101
- A stage can be instantiated by passing as keyword arguments the options
93102
applicable to the respective PDAL stage. For more on PDAL stages and their
94-
options, check the PDAL documentation on `Stage Objects <https://pdal.io/pipeline.html#stage-objects>`__.
103+
options, check the PDAL documentation on `Stage Objects <https://pdal.org/pipeline.html#stage-objects>`__.
95104

96105
- The ``filename`` option of ``Readers`` and ``Writers`` as well as the ``type``
97106
option of ``Filters`` can be passed positionally as the first argument.
@@ -417,8 +426,8 @@ Method:
417426
#. read point cloud file
418427
#. remove noise
419428
#. clean up invalid values
420-
#. classify ground points using `SMRF <https://pdal.io/en/2.9.2/stages/filters.smrf.html>`__
421-
#. write with `GDAL writer <https://pdal.io/en/2.9.2/stages/writers.gdal.html>`__
429+
#. classify ground points using `SMRF <https://pdal.org/en/latest/stages/filters.smrf.html>`__
430+
#. write with `GDAL writer <https://pdal.io/en/stable/stages/writers.gdal.html>`__
422431

423432
.. note:: If your pointcloud already has ground classified, you can skip all but
424433
the reader and writer and achieve the same result.
@@ -479,11 +488,11 @@ Method:
479488
480489
481490
.. _`Numpy`: http://www.numpy.org/
482-
.. _`schema`: http://www.pdal.io/dimensions.html
483-
.. _`metadata`: http://www.pdal.io/development/metadata.html
491+
.. _`schema`: http://www.pdal.org/dimensions.html
492+
.. _`metadata`: http://www.pdal.org/development/metadata.html
484493
.. _`TileDB`: https://tiledb.com/
485494
.. _`TileDB-PDAL integration`: https://docs.tiledb.com/geospatial/pdal
486-
.. _`TileDB writer plugin`: https://pdal.io/stages/writers.tiledb.html
495+
.. _`TileDB writer plugin`: https://pdal.org/stages/writers.tiledb.html
487496

488497
.. image:: https://github.com/PDAL/python/workflows/Build/badge.svg
489498
:target: https://github.com/PDAL/python/actions?query=workflow%3ABuild
@@ -493,6 +502,6 @@ Requirements
493502

494503
* PDAL 2.7+
495504
* Python >=3.9
496-
* Pybind11 (eg :code:`pip install pybind11[global]`)
497-
* Numpy >= 1.22 (eg :code:`pip install numpy`)
498-
* scikit-build-core (eg :code:`pip install scikit-build-core`)
505+
* Pybind11 >= 2.12 (eg :code:`pip install pybind11[global]`)
506+
* Numpy >= 1.24 at runtime and >= 2.0 for isolated builds (eg :code:`pip install numpy`)
507+
* scikit-build-core >= 1.0 (eg :code:`pip install scikit-build-core`)

‎pyproject.toml‎

Lines changed: 42 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,48 +22,76 @@ classifiers = [
2222
"Programming Language :: Python :: 3.10",
2323
"Programming Language :: Python :: 3.11",
2424
"Programming Language :: Python :: 3.12",
25+
"Programming Language :: Python :: 3.13",
2526
"Topic :: Scientific/Engineering :: GIS",
2627
]
2728

2829
dependencies = [
29-
"numpy >= 1.22"
30+
"numpy >= 1.24"
3031
]
3132

3233
dynamic = ["version"]
3334

3435
[project.optional-dependencies]
3536
test = [
36-
"pandas",
37-
"meshio"
37+
"geopandas",
38+
"meshio >= 5.3",
39+
"pandas >= 2",
40+
"pytest >= 8",
3841
]
3942

40-
[tool.setuptools]
41-
package-dir = {"" = "src"}
42-
zip-safe = false
43-
4443
[project.urls]
45-
homepage = "https://pdal.io"
46-
documentation = "https://pdal.io"
44+
homepage = "https://pdal.org"
45+
documentation = "https://pdal.org"
4746
repository = "https://github.com/PDAL/Python"
4847
changelog = "https://github.com/PDAL/python/blob/main/README.rst"
4948

5049
[build-system]
51-
requires = ["scikit-build-core >= 0.9", "numpy >= 1.22", "pybind11[global]"]
50+
requires = [
51+
"scikit-build-core >= 1.0",
52+
"numpy >= 2.0",
53+
"pybind11[global] >= 2.12",
54+
]
5255
build-backend = "scikit_build_core.build"
5356

5457

5558
[tool.scikit-build]
59+
minimum-version = "build-system.requires"
5660
build-dir = "build/{wheel_tag}"
57-
sdist.exclude = [".github"]
58-
sdist.cmake = true
61+
sdist.exclude = [
62+
".github",
63+
"**/__pycache__/**",
64+
"**/*.pyc",
65+
]
66+
sdist.cmake = false
67+
sdist.inclusion-mode = "explicit"
5968
cmake.build-type = "Release"
6069
sdist.include = [
70+
"CHANGES.txt",
71+
"CMakeLists.txt",
72+
"LICENSE.txt",
73+
"pyproject.toml",
74+
"README.rst",
6175
"src",
62-
"CMakeLists.txt"
76+
]
77+
wheel.packages = ["src/pdal"]
78+
wheel.exclude = [
79+
"pdal/*.cpp",
80+
"pdal/*.hpp",
81+
"pdal/export.hpp",
82+
"**/__pycache__/**",
83+
"**/*.pyc",
6384
]
6485
build.verbose = false
6586
logging.level = "ERROR"
6687

67-
[tool.scikit-build.metadata.version]
88+
[tool.uv]
89+
no-build-isolation = true
90+
91+
[tool.uv.pip]
92+
no-build-isolation = true
93+
94+
[[tool.dynamic-metadata]]
6895
provider = "scikit_build_core.metadata.regex"
96+
field = "version"
6997
input = "src/pdal/__init__.py"

‎src/pdal/__init__.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
__all__ = ["Pipeline", "Stage", "Reader", "Filter", "Writer", "dimensions", "info"]
2-
__version__ = '3.5.3'
2+
__version__ = '3.5.4'
33

44
from . import libpdalpython
55
from .drivers import inject_pdal_drivers

0 commit comments

Comments
 (0)