PROJ: set PROJ_LIB env var (#25029)

This commit is contained in:
Adam J. Stewart 2021-07-22 07:44:59 -05:00 committed by GitHub
parent c0b6d42b23
commit 4e0f97bee3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -107,3 +107,17 @@ def configure_args(self):
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)