diff options
author | Seth R. Johnson <johnsonsr@ornl.gov> | 2020-10-30 12:53:30 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-30 11:53:30 -0500 |
commit | f6189031b9227c5bc90ba80355405ed7de23f891 (patch) | |
tree | 92bd5e1cf1fc5a8e44a7da8f38be62e9d7511e6b /var | |
parent | fc1d39dedcac23412d2be5c1c640021440a36e19 (diff) | |
download | spack-f6189031b9227c5bc90ba80355405ed7de23f891.tar.gz spack-f6189031b9227c5bc90ba80355405ed7de23f891.tar.bz2 spack-f6189031b9227c5bc90ba80355405ed7de23f891.tar.xz spack-f6189031b9227c5bc90ba80355405ed7de23f891.zip |
ninja: support spack find external (#19616)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/ninja/package.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/ninja/package.py b/var/spack/repos/builtin/packages/ninja/package.py index 3924a7a635..40890c212e 100644 --- a/var/spack/repos/builtin/packages/ninja/package.py +++ b/var/spack/repos/builtin/packages/ninja/package.py @@ -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') |