GDAL: add spack external find support (#18004)

This commit is contained in:
Adam J. Stewart 2020-08-14 01:59:34 -05:00 committed by GitHub
parent c27e82f0ac
commit 2430ac5b7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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.