diff options
author | Sergey Kosukhin <sergey.kosukhin@mpimet.mpg.de> | 2022-09-24 23:00:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-24 16:00:45 -0500 |
commit | 5dc440ea92dbc1763f76c19b350c17355f96c5dc (patch) | |
tree | 4a27212bd373ca470e2b2db6759803cb81bf14ae /var/spack | |
parent | d9b7bedaaa0757b62195e37af4142a7108d0c1df (diff) | |
download | spack-5dc440ea92dbc1763f76c19b350c17355f96c5dc.tar.gz spack-5dc440ea92dbc1763f76c19b350c17355f96c5dc.tar.bz2 spack-5dc440ea92dbc1763f76c19b350c17355f96c5dc.tar.xz spack-5dc440ea92dbc1763f76c19b350c17355f96c5dc.zip |
py-eccodes: add version 1.5.0 (#32792)
* py-eccodes: ensure the minimal recommended shared version of libeccodes
* py-eccodes: set less general environment variables to enable location of libeccodes
* py-eccodes: add version 1.5.0
* py-eccodes: make flake8 happy
Diffstat (limited to 'var/spack')
-rw-r--r-- | var/spack/repos/builtin/packages/py-eccodes/package.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/var/spack/repos/builtin/packages/py-eccodes/package.py b/var/spack/repos/builtin/packages/py-eccodes/package.py index 29bd48f06d..3f1d35a3ee 100644 --- a/var/spack/repos/builtin/packages/py-eccodes/package.py +++ b/var/spack/repos/builtin/packages/py-eccodes/package.py @@ -3,8 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -import sys - from spack.package import * @@ -14,6 +12,7 @@ class PyEccodes(PythonPackage): homepage = "https://github.com/ecmwf/eccodes-python" pypi = "eccodes/eccodes-1.3.2.tar.gz" + version("1.5.0", sha256="e70c8f159140c343c215fd608ddf533be652ff05ad2ff17243c7b66cf92127fa") version("1.3.2", sha256="f282adfdc1bc658356163c9cef1857d4b2bae99399660d3d4fcb145a52d3b2a6") depends_on("py-setuptools", type="build") @@ -21,13 +20,14 @@ class PyEccodes(PythonPackage): depends_on("py-attrs", type=("build", "run")) depends_on("py-cffi", type=("build", "run")) depends_on("py-findlibs", type=("build", "run")) - depends_on("eccodes", type="run") + depends_on("eccodes@2.21.0:+shared", type="run") def setup_build_environment(self, env): - if sys.platform == "darwin": - env.prepend_path("DYLD_LIBRARY_PATH", self.spec["eccodes"].libs.directories[0]) - else: - env.prepend_path("LD_LIBRARY_PATH", self.spec["eccodes"].libs.directories[0]) + eccodes_libs = self.spec["eccodes:c,shared"].libs + # ECCODES_HOME has the highest precedence when searching for the library with py-findlibs: + env.set("ECCODES_HOME", eccodes_libs.directories[0]) + # but not if ecmwflibs (https://pypi.org/project/ecmwflibs/) is in the PYTHONPATH: + env.set("ECMWFLIBS_ECCODES", eccodes_libs.files[0]) def setup_run_environment(self, env): self.setup_build_environment(env) |