summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/py-liblas/package.py
blob: ff5e6d173d822e5b24e8011cd26b7de463c83b94 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack.package import *


class PyLiblas(PythonPackage):
    """libLAS is a C/C++ library for reading and writing the very common
    LAS LiDAR format.
    """

    homepage = "https://liblas.org/"
    pypi = "libLAS/libLAS-1.8.1.tar.gz"

    version("1.8.1", sha256="4d517670912989a0c7a33bb057167747e1013db6abdaa372f0775343ff0d1e16")

    depends_on("py-setuptools", type="build")
    depends_on("liblas")

    def setup_build_environment(self, env):
        env_var = "LD_LIBRARY_PATH"
        if self.spec.satisfies("platform=darwin"):
            env_var = "DYLD_FALLBACK_LIBRARY_PATH"
        env.prepend_path(env_var, self.spec["liblas"].libs.directories[0])

    setup_run_environment = setup_build_environment