tmontaigu / laszip-python

Python bindings for LASzip
MIT License
4 stars 7 forks source link

laszip-python

Unofficial bindings between Python and LASzip made using pybind11.

The main purpose is for integration within laspy.

Building

Building can be done using cmake or pip.

First pybind11 needs to be installed. You can install it via vcpkg or conda or other means.

By default a vendored version of LASZip is used, to use the system installed version pass -DUSE_VENDORED_LASZIP=OFF

set -gx SKBUILD_CMAKE_ARGS "-DUSE_VENDORED_LASZIP=OFF"
pip wheel .

To help cmake find Laszip you may have to use -DCMAKE_TOOLCHAIN_FILE=/some/path/vcpg.cmake if you used vcpkg to install laszip, or -DCMAKE_PREFIX_PARTH (or -DCMAKE_INCLUDE_PATH=... and -DCMAKE_LIBRARY_PATH=... in rare cases).

As setup.py calls cmake the same options make need to be given:

set -gx SKBUILD_CMAKE_ARGS -DCMAKE_PREFIX_PATH=...
pip install .

Source distribution

pip install build
python -m build . --sdist