1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 numpy,
6 laszip,
7 lazrs,
8 setuptools,
9 pytestCheckHook,
10 pythonOlder,
11}:
12
13buildPythonPackage rec {
14 pname = "laspy";
15 version = "2.6.1";
16 format = "pyproject";
17
18 disabled = pythonOlder "3.7";
19
20 src = fetchPypi {
21 inherit pname version;
22 hash = "sha256-zpy5oYUosqK5hVg99ApN6mjN2nmV5H5LALbUjfDojao=";
23 };
24
25 nativeBuildInputs = [ setuptools ];
26
27 propagatedBuildInputs = [
28 numpy
29 laszip
30 lazrs # much faster laz reading, see https://laspy.readthedocs.io/en/latest/installation.html#laz-support
31 ];
32
33 nativeCheckInputs = [ pytestCheckHook ];
34
35 pythonImportsCheck = [
36 "laspy"
37 # `laspy` supports multiple backends and detects them dynamically.
38 # We check their importability to make sure they are all working.
39 "laszip"
40 "lazrs"
41 ];
42
43 meta = with lib; {
44 description = "Interface for reading/modifying/creating .LAS LIDAR files";
45 mainProgram = "laspy";
46 homepage = "https://github.com/laspy/laspy";
47 changelog = "https://github.com/laspy/laspy/blob/${version}/CHANGELOG.md";
48 license = licenses.bsd2;
49 maintainers = with maintainers; [ matthewcroughan ];
50 teams = [ teams.geospatial ];
51 };
52}