ninja: support spack find external (#19616)
This commit is contained in:
parent
fc1d39dedc
commit
f6189031b9
@ -2,8 +2,7 @@
|
||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
from spack import *
|
||||
import re
|
||||
|
||||
|
||||
class Ninja(Package):
|
||||
@ -16,6 +15,8 @@ class Ninja(Package):
|
||||
url = "https://github.com/ninja-build/ninja/archive/v1.7.2.tar.gz"
|
||||
git = "https://github.com/ninja-build/ninja.git"
|
||||
|
||||
executables = ['^ninja$']
|
||||
|
||||
version('kitware', branch='features-for-fortran', git='https://github.com/Kitware/ninja.git')
|
||||
version('master', branch='master')
|
||||
version('1.10.1', sha256='a6b6f7ac360d4aabd54e299cc1d8fa7b234cd81b9401693da21221c62569a23e')
|
||||
@ -29,6 +30,11 @@ class Ninja(Package):
|
||||
|
||||
phases = ['configure', 'install']
|
||||
|
||||
@classmethod
|
||||
def determine_version(cls, exe):
|
||||
output = Executable(exe)('--version', output=str, error=str)
|
||||
return output.strip()
|
||||
|
||||
def configure(self, spec, prefix):
|
||||
python('configure.py', '--bootstrap')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user