diff --git a/pkgs/development/python-modules/laspy/default.nix b/pkgs/development/python-modules/laspy/default.nix index 9e68b13137f5..39057be18dcc 100644 --- a/pkgs/development/python-modules/laspy/default.nix +++ b/pkgs/development/python-modules/laspy/default.nix @@ -4,6 +4,7 @@ fetchPypi, numpy, laszip, + lazrs, setuptools, pytestCheckHook, pythonOlder, @@ -11,14 +12,14 @@ buildPythonPackage rec { pname = "laspy"; - version = "2.5.4"; + version = "2.6.1"; format = "pyproject"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-7r2/M3mvvAsk5+SBL6xWe/+IDR6FH3AXXSI3Wq7N9+E="; + hash = "sha256-zpy5oYUosqK5hVg99ApN6mjN2nmV5H5LALbUjfDojao="; }; nativeBuildInputs = [ setuptools ]; @@ -26,13 +27,17 @@ buildPythonPackage rec { propagatedBuildInputs = [ numpy laszip + lazrs # much faster laz reading, see https://laspy.readthedocs.io/en/latest/installation.html#laz-support ]; nativeCheckInputs = [ pytestCheckHook ]; pythonImportsCheck = [ "laspy" + # `laspy` supports multiple backends and detects them dynamically. + # We check their importability to make sure they are all working. "laszip" + "lazrs" ]; meta = with lib; { @@ -42,5 +47,6 @@ buildPythonPackage rec { changelog = "https://github.com/laspy/laspy/blob/${version}/CHANGELOG.md"; license = licenses.bsd2; maintainers = with maintainers; [ matthewcroughan ]; + teams = [ teams.geospatial ]; }; } diff --git a/pkgs/development/python-modules/lazrs/default.nix b/pkgs/development/python-modules/lazrs/default.nix new file mode 100644 index 000000000000..f0c24b250675 --- /dev/null +++ b/pkgs/development/python-modules/lazrs/default.nix @@ -0,0 +1,41 @@ +{ + lib, + buildPythonPackage, + fetchPypi, + rustPlatform, +}: +buildPythonPackage rec { + pname = "lazrs"; + version = "0.7.0"; + + format = "pyproject"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-UxkbNRwdn6RfdEcWmDhL9CveFFmTCWRfudTDU/D7fyQ="; + }; + + nativeBuildInputs = [ + rustPlatform.cargoSetupHook + rustPlatform.maturinBuildHook + ]; + + cargoDeps = rustPlatform.fetchCargoVendor { + inherit src; + inherit pname version; + hash = "sha256-GVb34eznC5/TA/SpvDq9uJ9M3nUTfx0KyfRFd4WUyCI="; + }; + + pythonImportsCheck = [ "lazrs" ]; + + meta = { + description = "Python bindings for laz-rs"; + homepage = "https://github.com/laz-rs/laz-rs-python"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ + nh2 + chpatrick + ]; + teams = [ lib.teams.geospatial ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 25848319e518..12e28b5b02bb 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7933,6 +7933,8 @@ self: super: with self; { lazr-uri = callPackage ../development/python-modules/lazr-uri { }; + lazrs = callPackage ../development/python-modules/lazrs { }; + lazy = callPackage ../development/python-modules/lazy { }; lazy-imports = callPackage ../development/python-modules/lazy-imports { };