summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2021-07-22 07:44:59 -0500
committerGitHub <noreply@github.com>2021-07-22 14:44:59 +0200
commit4e0f97bee36cafc526442634a133ea2c903556c5 (patch)
treea4a2c6b265644281e84774d534b8b0ccfd36ef1f /var
parentc0b6d42b2335dedafc5198d9ef0549922879c7a5 (diff)
downloadspack-4e0f97bee36cafc526442634a133ea2c903556c5.tar.gz
spack-4e0f97bee36cafc526442634a133ea2c903556c5.tar.bz2
spack-4e0f97bee36cafc526442634a133ea2c903556c5.tar.xz
spack-4e0f97bee36cafc526442634a133ea2c903556c5.zip
PROJ: set PROJ_LIB env var (#25029)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/proj/package.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/proj/package.py b/var/spack/repos/builtin/packages/proj/package.py
index 0bc16b8056..9bf9745547 100644
--- a/var/spack/repos/builtin/packages/proj/package.py
+++ b/var/spack/repos/builtin/packages/proj/package.py
@@ -107,3 +107,17 @@ class Proj(AutotoolsPackage):
args.append('--without-curl')
return args
+
+ def setup_run_environment(self, env):
+ # PROJ_LIB doesn't need to be set. However, it may be set by conda.
+ # If an incompatible version of PROJ is found in PROJ_LIB, it can
+ # cause the package to fail at run-time. See the following for details:
+ # * https://proj.org/usage/environmentvars.html
+ # * https://rasterio.readthedocs.io/en/latest/faq.html
+ env.set('PROJ_LIB', self.prefix.share.proj)
+
+ def setup_dependent_build_environment(self, env, dependent_spec):
+ self.setup_run_environment(env)
+
+ def setup_dependent_run_environment(self, env, dependent_spec):
+ self.setup_run_environment(env)