summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2020-08-14 01:59:34 -0500
committerGitHub <noreply@github.com>2020-08-14 08:59:34 +0200
commit2430ac5b7c06770eb3e746740f692002ed85e80f (patch)
tree642d9efa0d087d55c461a5de0d3a01e005c71191 /var
parentc27e82f0ac48d4839203d87435619bce31be354a (diff)
downloadspack-2430ac5b7c06770eb3e746740f692002ed85e80f.tar.gz
spack-2430ac5b7c06770eb3e746740f692002ed85e80f.tar.bz2
spack-2430ac5b7c06770eb3e746740f692002ed85e80f.tar.xz
spack-2430ac5b7c06770eb3e746740f692002ed85e80f.zip
GDAL: add spack external find support (#18004)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/gdal/package.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/gdal/package.py b/var/spack/repos/builtin/packages/gdal/package.py
index e5a727b66d..a24d7d07da 100644
--- a/var/spack/repos/builtin/packages/gdal/package.py
+++ b/var/spack/repos/builtin/packages/gdal/package.py
@@ -165,6 +165,12 @@ class Gdal(AutotoolsPackage):
conflicts('+mdb', when='~java', msg='MDB driver requires Java')
+ executables = ['^gdal-config$']
+
+ @classmethod
+ def determine_version(cls, exe):
+ return Executable(exe)('--version', output=str, error=str).rstrip()
+
def setup_build_environment(self, env):
# Needed to install Python bindings to GDAL installation
# prefix instead of Python installation prefix.