hwloc: added support to find external (#28348)
This commit is contained in:
parent
415d662ec0
commit
b8d159c62d
@ -2,6 +2,7 @@
|
|||||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
import re
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
|
||||||
@ -28,6 +29,7 @@ class Hwloc(AutotoolsPackage):
|
|||||||
git = 'https://github.com/open-mpi/hwloc.git'
|
git = 'https://github.com/open-mpi/hwloc.git'
|
||||||
|
|
||||||
maintainers = ['bgoglin']
|
maintainers = ['bgoglin']
|
||||||
|
executables = ['^hwloc-bind$']
|
||||||
|
|
||||||
version('master', branch='master')
|
version('master', branch='master')
|
||||||
version('2.7.0', sha256='d9b23e9b0d17247e8b50254810427ca8a9857dc868e2e3a049f958d7c66af374')
|
version('2.7.0', sha256='d9b23e9b0d17247e8b50254810427ca8a9857dc868e2e3a049f958d7c66af374')
|
||||||
@ -122,6 +124,13 @@ class Hwloc(AutotoolsPackage):
|
|||||||
# variant of llvm-amdgpu depends on hwloc.
|
# variant of llvm-amdgpu depends on hwloc.
|
||||||
depends_on('llvm-amdgpu~openmp', when='+opencl')
|
depends_on('llvm-amdgpu~openmp', when='+opencl')
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def determine_version(cls, exe):
|
||||||
|
output = Executable(exe)('--version', output=str, error=str)
|
||||||
|
match = re.search(r'hwloc-bind (\S+)',
|
||||||
|
output)
|
||||||
|
return match.group(1) if match else None
|
||||||
|
|
||||||
def url_for_version(self, version):
|
def url_for_version(self, version):
|
||||||
return "http://www.open-mpi.org/software/hwloc/v%s/downloads/hwloc-%s.tar.gz" % (version.up_to(2), version)
|
return "http://www.open-mpi.org/software/hwloc/v%s/downloads/hwloc-%s.tar.gz" % (version.up_to(2), version)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user