builtin.mock et al. : changes to packages
Signed-off-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
This commit is contained in:
parent
8c1a4de9e2
commit
18152b9b0f
@ -16,5 +16,8 @@ class Bowtie(Package):
|
|||||||
version("1.2.2", md5="1c837ecd990bb022d07e7aab32b09847")
|
version("1.2.2", md5="1c837ecd990bb022d07e7aab32b09847")
|
||||||
version("1.2.0", md5="1c837ecd990bb022d07e7aab32b09847")
|
version("1.2.0", md5="1c837ecd990bb022d07e7aab32b09847")
|
||||||
|
|
||||||
|
depends_on("c", type="build")
|
||||||
|
|
||||||
conflicts("%gcc@:4.5.0", when="@1.2.2")
|
conflicts("%gcc@:4.5.0", when="@1.2.2")
|
||||||
conflicts("%gcc@:10.2.1", when="@:1.3.0")
|
conflicts("%gcc@:10.2.1", when="@:1.2.9")
|
||||||
|
conflicts("%gcc", when="@1.3")
|
||||||
|
@ -14,6 +14,8 @@ class Callpath(Package):
|
|||||||
version("0.9", md5="0123456789abcdef0123456789abcdef")
|
version("0.9", md5="0123456789abcdef0123456789abcdef")
|
||||||
version("1.0", md5="0123456789abcdef0123456789abcdef")
|
version("1.0", md5="0123456789abcdef0123456789abcdef")
|
||||||
|
|
||||||
|
depends_on("c", type="build")
|
||||||
|
|
||||||
depends_on("dyninst")
|
depends_on("dyninst")
|
||||||
depends_on("mpi")
|
depends_on("mpi")
|
||||||
|
|
||||||
|
@ -30,6 +30,8 @@ class CmakeClient(CMakePackage):
|
|||||||
variant("single", description="", default="blue", values=("blue", "red", "green"), multi=False)
|
variant("single", description="", default="blue", values=("blue", "red", "green"), multi=False)
|
||||||
variant("truthy", description="", default=True)
|
variant("truthy", description="", default=True)
|
||||||
|
|
||||||
|
depends_on("c", type="build")
|
||||||
|
|
||||||
callback_counter = 0
|
callback_counter = 0
|
||||||
|
|
||||||
flipped = False
|
flipped = False
|
||||||
|
@ -21,6 +21,9 @@ class Cmake(Package):
|
|||||||
homepage = "https://www.cmake.org"
|
homepage = "https://www.cmake.org"
|
||||||
url = "https://cmake.org/files/v3.4/cmake-3.4.3.tar.gz"
|
url = "https://cmake.org/files/v3.4/cmake-3.4.3.tar.gz"
|
||||||
|
|
||||||
|
depends_on("c", type="build")
|
||||||
|
depends_on("cxx", type="build")
|
||||||
|
|
||||||
version(
|
version(
|
||||||
"3.23.1",
|
"3.23.1",
|
||||||
md5="4cb3ff35b2472aae70f542116d616e63",
|
md5="4cb3ff35b2472aae70f542116d616e63",
|
||||||
|
@ -15,6 +15,7 @@ class ConflictParent(Package):
|
|||||||
version("1.0", md5="0123456789abcdef0123456789abcdef")
|
version("1.0", md5="0123456789abcdef0123456789abcdef")
|
||||||
|
|
||||||
depends_on("conflict")
|
depends_on("conflict")
|
||||||
|
depends_on("c", type="build")
|
||||||
|
|
||||||
conflicts("^conflict~foo", when="@0.9")
|
conflicts("^conflict~foo", when="@0.9")
|
||||||
|
|
||||||
|
@ -18,6 +18,8 @@ class Conflict(Package):
|
|||||||
|
|
||||||
conflicts("%clang", when="+foo")
|
conflicts("%clang", when="+foo")
|
||||||
|
|
||||||
|
depends_on("c", type="build")
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
configure("--prefix=%s" % prefix)
|
configure("--prefix=%s" % prefix)
|
||||||
make()
|
make()
|
||||||
|
@ -13,3 +13,5 @@ class DtDiamondBottom(Package):
|
|||||||
url = "http://www.example.com/dt-diamond-bottom-1.0.tar.gz"
|
url = "http://www.example.com/dt-diamond-bottom-1.0.tar.gz"
|
||||||
|
|
||||||
version("1.0", md5="0123456789abcdef0123456789abcdef")
|
version("1.0", md5="0123456789abcdef0123456789abcdef")
|
||||||
|
|
||||||
|
depends_on("c", type="build")
|
||||||
|
@ -15,3 +15,4 @@ class DtDiamondLeft(Package):
|
|||||||
version("1.0", md5="0123456789abcdef0123456789abcdef")
|
version("1.0", md5="0123456789abcdef0123456789abcdef")
|
||||||
|
|
||||||
depends_on("dt-diamond-bottom", type="build")
|
depends_on("dt-diamond-bottom", type="build")
|
||||||
|
depends_on("c", type="build")
|
||||||
|
@ -15,3 +15,4 @@ class DtDiamondRight(Package):
|
|||||||
version("1.0", md5="0123456789abcdef0123456789abcdef")
|
version("1.0", md5="0123456789abcdef0123456789abcdef")
|
||||||
|
|
||||||
depends_on("dt-diamond-bottom", type=("build", "link", "run"))
|
depends_on("dt-diamond-bottom", type=("build", "link", "run"))
|
||||||
|
depends_on("c", type="build")
|
||||||
|
@ -16,3 +16,5 @@ class DtDiamond(Package):
|
|||||||
|
|
||||||
depends_on("dt-diamond-left")
|
depends_on("dt-diamond-left")
|
||||||
depends_on("dt-diamond-right")
|
depends_on("dt-diamond-right")
|
||||||
|
|
||||||
|
depends_on("c", type="build")
|
||||||
|
@ -29,6 +29,8 @@ class Dyninst(Package):
|
|||||||
depends_on("libelf")
|
depends_on("libelf")
|
||||||
depends_on("libdwarf")
|
depends_on("libdwarf")
|
||||||
|
|
||||||
|
depends_on("c", type="build")
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
mkdirp(prefix)
|
mkdirp(prefix)
|
||||||
touch(join_path(prefix, "dummyfile"))
|
touch(join_path(prefix, "dummyfile"))
|
||||||
|
@ -19,4 +19,6 @@ class Fftw(Package):
|
|||||||
|
|
||||||
variant("mpi", default=False, description="Enable MPI")
|
variant("mpi", default=False, description="Enable MPI")
|
||||||
|
|
||||||
|
depends_on("c", type="build")
|
||||||
|
|
||||||
depends_on("mpi", when="+mpi")
|
depends_on("mpi", when="+mpi")
|
||||||
|
1
var/spack/repos/builtin.mock/packages/gcc-runtime
Symbolic link
1
var/spack/repos/builtin.mock/packages/gcc-runtime
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../builtin/packages/gcc-runtime
|
@ -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 os.path
|
||||||
|
|
||||||
from spack.package import *
|
from spack.package import *
|
||||||
|
|
||||||
@ -24,7 +25,9 @@ class Gcc(CompilerPackage, Package):
|
|||||||
description="Compilers and runtime libraries to build",
|
description="Compilers and runtime libraries to build",
|
||||||
)
|
)
|
||||||
|
|
||||||
depends_on("conflict", when="@3.0")
|
provides("c", when="languages=c")
|
||||||
|
provides("cxx", when="languages=c++")
|
||||||
|
provides("fortran", when="languages=fortran")
|
||||||
|
|
||||||
c_names = ["gcc"]
|
c_names = ["gcc"]
|
||||||
cxx_names = ["g++"]
|
cxx_names = ["g++"]
|
||||||
@ -34,9 +37,100 @@ class Gcc(CompilerPackage, Package):
|
|||||||
compiler_version_regex = r"(?<!clang version)\s?([0-9.]+)"
|
compiler_version_regex = r"(?<!clang version)\s?([0-9.]+)"
|
||||||
compiler_version_argument = ("-dumpfullversion", "-dumpversion")
|
compiler_version_argument = ("-dumpfullversion", "-dumpversion")
|
||||||
|
|
||||||
|
link_paths = {
|
||||||
|
"c": os.path.join("gcc", "gcc"),
|
||||||
|
"cxx": os.path.join("gcc", "g++"),
|
||||||
|
"fortran": os.path.join("gcc", "gfortran"),
|
||||||
|
}
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
# Create the minimal compiler that will fool `spack compiler find`
|
# Create the minimal compiler that will fool `spack compiler find`
|
||||||
mkdirp(prefix.bin)
|
mkdirp(prefix.bin)
|
||||||
with open(prefix.bin.gcc, "w") as f:
|
with open(prefix.bin.gcc, "w") as f:
|
||||||
f.write('#!/bin/bash\necho "%s"' % str(spec.version))
|
f.write('#!/bin/bash\necho "%s"' % str(spec.version))
|
||||||
set_executable(prefix.bin.gcc)
|
set_executable(prefix.bin.gcc)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def cc(self):
|
||||||
|
msg = "cannot retrieve C compiler [spec is not concrete]"
|
||||||
|
assert self.spec.concrete, msg
|
||||||
|
if self.spec.external:
|
||||||
|
return self.spec.extra_attributes["compilers"].get("c", None)
|
||||||
|
result = None
|
||||||
|
if "languages=c" in self.spec:
|
||||||
|
result = str(self.spec.prefix.bin.gcc)
|
||||||
|
return result
|
||||||
|
|
||||||
|
@property
|
||||||
|
def cxx(self):
|
||||||
|
msg = "cannot retrieve C++ compiler [spec is not concrete]"
|
||||||
|
assert self.spec.concrete, msg
|
||||||
|
if self.spec.external:
|
||||||
|
return self.spec.extra_attributes["compilers"].get("cxx", None)
|
||||||
|
result = None
|
||||||
|
if "languages=c++" in self.spec:
|
||||||
|
result = os.path.join(self.spec.prefix.bin, "g++")
|
||||||
|
return result
|
||||||
|
|
||||||
|
@property
|
||||||
|
def fortran(self):
|
||||||
|
msg = "cannot retrieve Fortran compiler [spec is not concrete]"
|
||||||
|
assert self.spec.concrete, msg
|
||||||
|
if self.spec.external:
|
||||||
|
return self.spec.extra_attributes["compilers"].get("fortran", None)
|
||||||
|
result = None
|
||||||
|
if "languages=fortran" in self.spec:
|
||||||
|
result = str(self.spec.prefix.bin.gfortran)
|
||||||
|
return result
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def runtime_constraints(cls, *, spec, pkg):
|
||||||
|
"""Callback function to inject runtime-related rules into the solver.
|
||||||
|
|
||||||
|
Rule-injection is obtained through method calls of the ``pkg`` argument.
|
||||||
|
|
||||||
|
Documentation for this function is temporary. When the API will be in its final state,
|
||||||
|
we'll document the behavior at https://spack.readthedocs.io/en/latest/
|
||||||
|
|
||||||
|
Args:
|
||||||
|
spec: spec that will inject runtime dependencies
|
||||||
|
pkg: object used to forward information to the solver
|
||||||
|
"""
|
||||||
|
pkg("*").depends_on(
|
||||||
|
"gcc-runtime",
|
||||||
|
when="%gcc",
|
||||||
|
type="link",
|
||||||
|
description="If any package uses %gcc, it depends on gcc-runtime",
|
||||||
|
)
|
||||||
|
pkg("*").depends_on(
|
||||||
|
f"gcc-runtime@{str(spec.version)}:",
|
||||||
|
when=f"^[deptypes=build] {spec.name}@{spec.versions}",
|
||||||
|
type="link",
|
||||||
|
description=f"If any package uses %{str(spec)}, "
|
||||||
|
f"it depends on gcc-runtime@{str(spec.version)}:",
|
||||||
|
)
|
||||||
|
|
||||||
|
gfortran_str = "libgfortran@5"
|
||||||
|
if spec.satisfies("gcc@:6"):
|
||||||
|
gfortran_str = "libgfortran@3"
|
||||||
|
elif spec.satisfies("gcc@7"):
|
||||||
|
gfortran_str = "libgfortran@4"
|
||||||
|
|
||||||
|
for fortran_virtual in ("fortran-rt", gfortran_str):
|
||||||
|
pkg("*").depends_on(
|
||||||
|
fortran_virtual,
|
||||||
|
when=f"^[virtuals=fortran deptypes=build] {spec.name}@{spec.versions}",
|
||||||
|
type="link",
|
||||||
|
description=f"Add a dependency on '{gfortran_str}' for nodes compiled with "
|
||||||
|
f"{str(spec)} and using the 'fortran' language",
|
||||||
|
)
|
||||||
|
# The version of gcc-runtime is the same as the %gcc used to "compile" it
|
||||||
|
pkg("gcc-runtime").requires(
|
||||||
|
f"@{str(spec.versions)}", when=f"^[deptypes=build] {spec.name}@{spec.versions}"
|
||||||
|
)
|
||||||
|
|
||||||
|
# If a node used %gcc@X.Y its dependencies must use gcc-runtime@:X.Y
|
||||||
|
# (technically @:X is broader than ... <= @=X but this should work in practice)
|
||||||
|
pkg("*").propagate(
|
||||||
|
f"gcc@:{str(spec.version)}", when=f"^[deptypes=build] {spec.name}@{spec.versions}"
|
||||||
|
)
|
||||||
|
@ -27,6 +27,8 @@ class IntelOneapiCompilers(Package, CompilerPackage):
|
|||||||
r"(?:(?:oneAPI DPC\+\+(?:\/C\+\+)? Compiler)|(?:\(IFORT\))|(?:\(IFX\))) (\S+)"
|
r"(?:(?:oneAPI DPC\+\+(?:\/C\+\+)? Compiler)|(?:\(IFORT\))|(?:\(IFX\))) (\S+)"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
depends_on("c", type="build")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def compiler_search_prefix(self):
|
def compiler_search_prefix(self):
|
||||||
return self.prefix.foo.bar.baz.bin
|
return self.prefix.foo.bar.baz.bin
|
||||||
|
@ -21,5 +21,8 @@ class Libdwarf(Package):
|
|||||||
|
|
||||||
depends_on("libelf")
|
depends_on("libelf")
|
||||||
|
|
||||||
|
depends_on("c", type="build")
|
||||||
|
depends_on("cxx", type="build")
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
touch(prefix.libdwarf)
|
touch(prefix.libdwarf)
|
||||||
|
@ -16,5 +16,7 @@ class Libelf(Package):
|
|||||||
|
|
||||||
patch("local.patch", when="@0.8.10")
|
patch("local.patch", when="@0.8.10")
|
||||||
|
|
||||||
|
depends_on("c", type="build")
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
touch(prefix.libelf)
|
touch(prefix.libelf)
|
||||||
|
@ -18,6 +18,8 @@ class Llvm(Package, CompilerPackage):
|
|||||||
"clang", default=True, description="Build the LLVM C/C++/Objective-C compiler frontend"
|
"clang", default=True, description="Build the LLVM C/C++/Objective-C compiler frontend"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
provides("c", "cxx", when="+clang")
|
||||||
|
|
||||||
c_names = ["clang"]
|
c_names = ["clang"]
|
||||||
cxx_names = ["clang++"]
|
cxx_names = ["clang++"]
|
||||||
fortran_names = ["flang"]
|
fortran_names = ["flang"]
|
||||||
@ -28,3 +30,36 @@ def install(self, spec, prefix):
|
|||||||
with open(prefix.bin.gcc, "w") as f:
|
with open(prefix.bin.gcc, "w") as f:
|
||||||
f.write('#!/bin/bash\necho "%s"' % str(spec.version))
|
f.write('#!/bin/bash\necho "%s"' % str(spec.version))
|
||||||
set_executable(prefix.bin.gcc)
|
set_executable(prefix.bin.gcc)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def cc(self):
|
||||||
|
msg = "cannot retrieve C compiler [spec is not concrete]"
|
||||||
|
assert self.spec.concrete, msg
|
||||||
|
if self.spec.external:
|
||||||
|
return self.spec.extra_attributes["compilers"].get("c", None)
|
||||||
|
result = None
|
||||||
|
if "+clang" in self.spec:
|
||||||
|
result = os.path.join(self.spec.prefix.bin, "clang")
|
||||||
|
return result
|
||||||
|
|
||||||
|
@property
|
||||||
|
def cxx(self):
|
||||||
|
msg = "cannot retrieve C++ compiler [spec is not concrete]"
|
||||||
|
assert self.spec.concrete, msg
|
||||||
|
if self.spec.external:
|
||||||
|
return self.spec.extra_attributes["compilers"].get("cxx", None)
|
||||||
|
result = None
|
||||||
|
if "+clang" in self.spec:
|
||||||
|
result = os.path.join(self.spec.prefix.bin, "clang++")
|
||||||
|
return result
|
||||||
|
|
||||||
|
@property
|
||||||
|
def fortan(self):
|
||||||
|
msg = "cannot retrieve Fortran compiler [spec is not concrete]"
|
||||||
|
assert self.spec.concrete, msg
|
||||||
|
if self.spec.external:
|
||||||
|
return self.spec.extra_attributes["compilers"].get("fc", None)
|
||||||
|
result = None
|
||||||
|
if "+flang" in self.spec:
|
||||||
|
result = os.path.join(self.spec.prefix.bin, "flang")
|
||||||
|
return result
|
||||||
|
@ -27,6 +27,10 @@ class Mpich(Package):
|
|||||||
provides("mpi@:3", when="@3:")
|
provides("mpi@:3", when="@3:")
|
||||||
provides("mpi@:1", when="@:1")
|
provides("mpi@:1", when="@:1")
|
||||||
|
|
||||||
|
depends_on("c", type="build")
|
||||||
|
depends_on("cxx", type="build")
|
||||||
|
depends_on("fortran", type="build")
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
touch(prefix.mpich)
|
touch(prefix.mpich)
|
||||||
|
|
||||||
|
@ -25,6 +25,8 @@ class Mpich2(Package):
|
|||||||
provides("mpi@:2.1", when="@1.1:")
|
provides("mpi@:2.1", when="@1.1:")
|
||||||
provides("mpi@:2.2", when="@1.2:")
|
provides("mpi@:2.2", when="@1.2:")
|
||||||
|
|
||||||
|
depends_on("c", type="build")
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
configure("--prefix=%s" % prefix)
|
configure("--prefix=%s" % prefix)
|
||||||
make()
|
make()
|
||||||
|
@ -25,6 +25,8 @@ class Mpileaks(Package):
|
|||||||
depends_on("mpi")
|
depends_on("mpi")
|
||||||
depends_on("callpath")
|
depends_on("callpath")
|
||||||
|
|
||||||
|
depends_on("c", type="build")
|
||||||
|
|
||||||
# Will be used to try raising an exception
|
# Will be used to try raising an exception
|
||||||
libs = None
|
libs = None
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@ class Multimethod(MultimethodBase):
|
|||||||
variant("mpi", default=False, description="")
|
variant("mpi", default=False, description="")
|
||||||
|
|
||||||
depends_on("mpi", when="+mpi")
|
depends_on("mpi", when="+mpi")
|
||||||
|
depends_on("c", type="build")
|
||||||
|
|
||||||
#
|
#
|
||||||
# These functions are only valid for versions 1, 3, and 4.
|
# These functions are only valid for versions 1, 3, and 4.
|
||||||
@ -80,7 +81,7 @@ def mpi_version(self):
|
|||||||
def has_a_default(self):
|
def has_a_default(self):
|
||||||
return "default"
|
return "default"
|
||||||
|
|
||||||
@when("%gcc")
|
@when("%gcc@10:")
|
||||||
def has_a_default(self):
|
def has_a_default(self):
|
||||||
return "gcc"
|
return "gcc"
|
||||||
|
|
||||||
|
@ -42,3 +42,5 @@ class MultivalueVariant(Package):
|
|||||||
depends_on("callpath")
|
depends_on("callpath")
|
||||||
depends_on("pkg-a")
|
depends_on("pkg-a")
|
||||||
depends_on("pkg-a@1.0", when="fee=barbaz")
|
depends_on("pkg-a@1.0", when="fee=barbaz")
|
||||||
|
|
||||||
|
depends_on("c", type="build")
|
||||||
|
@ -15,3 +15,4 @@ class OpenblasWithLapack(Package):
|
|||||||
version("0.2.15", md5="b1190f3d3471685f17cfd1ec1d252ac9")
|
version("0.2.15", md5="b1190f3d3471685f17cfd1ec1d252ac9")
|
||||||
|
|
||||||
provides("lapack", "blas")
|
provides("lapack", "blas")
|
||||||
|
depends_on("c", type="build")
|
||||||
|
@ -19,6 +19,8 @@ class Openblas(Package):
|
|||||||
|
|
||||||
variant("shared", default=True, description="Build shared libraries")
|
variant("shared", default=True, description="Build shared libraries")
|
||||||
|
|
||||||
|
depends_on("c", type="build")
|
||||||
|
|
||||||
# See #20019 for this conflict
|
# See #20019 for this conflict
|
||||||
conflicts("%gcc@:4.4", when="@0.2.14:")
|
conflicts("%gcc@:4.4", when="@0.2.14:")
|
||||||
|
|
||||||
|
@ -36,6 +36,8 @@ class PkgA(AutotoolsPackage):
|
|||||||
depends_on("pkg-b", when="foobar=bar")
|
depends_on("pkg-b", when="foobar=bar")
|
||||||
depends_on("test-dependency", type="test")
|
depends_on("test-dependency", type="test")
|
||||||
|
|
||||||
|
depends_on("c", type="build")
|
||||||
|
|
||||||
parallel = False
|
parallel = False
|
||||||
|
|
||||||
|
|
||||||
|
@ -19,4 +19,5 @@ class PkgB(Package):
|
|||||||
"foo", description="", values=any_combination_of("bar", "baz", "fee").with_default("bar")
|
"foo", description="", values=any_combination_of("bar", "baz", "fee").with_default("bar")
|
||||||
)
|
)
|
||||||
|
|
||||||
|
depends_on("c", type="build")
|
||||||
depends_on("test-dependency", type="test")
|
depends_on("test-dependency", type="test")
|
||||||
|
@ -12,4 +12,16 @@ class PkgC(Package):
|
|||||||
homepage = "http://www.example.com"
|
homepage = "http://www.example.com"
|
||||||
url = "http://www.example.com/c-1.0.tar.gz"
|
url = "http://www.example.com/c-1.0.tar.gz"
|
||||||
|
|
||||||
|
# Needed to test CDash reporting
|
||||||
|
phases = ["configure", "build", "install"]
|
||||||
|
|
||||||
version("1.0", md5="0123456789abcdef0123456789abcdef")
|
version("1.0", md5="0123456789abcdef0123456789abcdef")
|
||||||
|
|
||||||
|
def configure(self, spec, prefix):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def build(self, spec, prefix):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def install(self, spec, prefix):
|
||||||
|
touch(prefix.pkg_c)
|
||||||
|
@ -16,3 +16,5 @@ class RequiresClang(Package):
|
|||||||
version("0.9", md5="abcd456789abcdef0123456789abcdef")
|
version("0.9", md5="abcd456789abcdef0123456789abcdef")
|
||||||
|
|
||||||
requires("%clang", msg="can only be compiled with Clang")
|
requires("%clang", msg="can only be compiled with Clang")
|
||||||
|
|
||||||
|
depends_on("c", type="build")
|
||||||
|
@ -16,3 +16,5 @@ class RequiresClangOrGcc(Package):
|
|||||||
version("0.9", md5="abcd456789abcdef0123456789abcdef")
|
version("0.9", md5="abcd456789abcdef0123456789abcdef")
|
||||||
|
|
||||||
requires("%gcc", "%clang", policy="one_of")
|
requires("%gcc", "%clang", policy="one_of")
|
||||||
|
|
||||||
|
depends_on("c", type="build")
|
||||||
|
@ -29,3 +29,5 @@ class SimpleInheritance(BaseWithDirectives):
|
|||||||
|
|
||||||
depends_on("openblas", when="+openblas")
|
depends_on("openblas", when="+openblas")
|
||||||
provides("lapack", when="+openblas")
|
provides("lapack", when="+openblas")
|
||||||
|
|
||||||
|
depends_on("c", type="build")
|
||||||
|
@ -15,3 +15,5 @@ class StickyVariantDependent(AutotoolsPackage):
|
|||||||
|
|
||||||
depends_on("sticky-variant")
|
depends_on("sticky-variant")
|
||||||
conflicts("%gcc", when="^sticky-variant~allow-gcc")
|
conflicts("%gcc", when="^sticky-variant~allow-gcc")
|
||||||
|
|
||||||
|
depends_on("c", type="build")
|
||||||
|
@ -16,3 +16,5 @@ class StickyVariant(AutotoolsPackage):
|
|||||||
variant("allow-gcc", description="", default=False, sticky=True)
|
variant("allow-gcc", description="", default=False, sticky=True)
|
||||||
|
|
||||||
conflicts("%gcc", when="~allow-gcc")
|
conflicts("%gcc", when="~allow-gcc")
|
||||||
|
|
||||||
|
depends_on("c", type="build")
|
||||||
|
@ -15,6 +15,8 @@ class WithConstraintMet(Package):
|
|||||||
version("2.0", md5="0123456789abcdef0123456789abcdef")
|
version("2.0", md5="0123456789abcdef0123456789abcdef")
|
||||||
version("1.0", md5="0123456789abcdef0123456789abcdef")
|
version("1.0", md5="0123456789abcdef0123456789abcdef")
|
||||||
|
|
||||||
|
depends_on("c", type="build")
|
||||||
|
|
||||||
with when("@1.0"):
|
with when("@1.0"):
|
||||||
depends_on("pkg-b")
|
depends_on("pkg-b")
|
||||||
conflicts("%gcc", when="+foo")
|
conflicts("%gcc", when="+foo")
|
||||||
|
@ -16,4 +16,6 @@ class Zmpi(Package):
|
|||||||
version("1.0", md5="0123456789abcdef0123456789abcdef")
|
version("1.0", md5="0123456789abcdef0123456789abcdef")
|
||||||
|
|
||||||
provides("mpi@:10.0")
|
provides("mpi@:10.0")
|
||||||
|
|
||||||
depends_on("fake")
|
depends_on("fake")
|
||||||
|
depends_on("c", type="build")
|
||||||
|
1
var/spack/repos/compiler_runtime.test/packages/gcc
Symbolic link
1
var/spack/repos/compiler_runtime.test/packages/gcc
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../builtin.mock/packages/gcc
|
1
var/spack/repos/compiler_runtime.test/packages/gcc-runtime
Symbolic link
1
var/spack/repos/compiler_runtime.test/packages/gcc-runtime
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../builtin.mock/packages/gcc-runtime
|
@ -1,13 +0,0 @@
|
|||||||
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
|
||||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
|
||||||
|
|
||||||
from spack.package import *
|
|
||||||
|
|
||||||
|
|
||||||
class GccRuntime(Package):
|
|
||||||
homepage = "https://example.com"
|
|
||||||
has_code = False
|
|
||||||
tags = ["runtime"]
|
|
||||||
requires("%gcc")
|
|
@ -1,35 +0,0 @@
|
|||||||
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
|
||||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
|
||||||
|
|
||||||
from spack.package import *
|
|
||||||
|
|
||||||
|
|
||||||
class Gcc(Package):
|
|
||||||
homepage = "http://www.example.com/"
|
|
||||||
has_code = False
|
|
||||||
|
|
||||||
version("13.2.0")
|
|
||||||
version("12.3.0")
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def runtime_constraints(cls, *, spec, pkg):
|
|
||||||
pkg("*").depends_on(
|
|
||||||
"gcc-runtime",
|
|
||||||
when="%gcc",
|
|
||||||
type="link",
|
|
||||||
description="If any package uses %gcc, it depends on gcc-runtime",
|
|
||||||
)
|
|
||||||
pkg("*").depends_on(
|
|
||||||
f"gcc-runtime@{str(spec.version)}:",
|
|
||||||
when=f"%{str(spec)}",
|
|
||||||
type="link",
|
|
||||||
description=f"If any package uses %{str(spec)}, "
|
|
||||||
f"it depends on gcc-runtime@{str(spec.version)}:",
|
|
||||||
)
|
|
||||||
# The version of gcc-runtime is the same as the %gcc used to "compile" it
|
|
||||||
pkg("gcc-runtime").requires(f"@={str(spec.version)}", when=f"%{str(spec)}")
|
|
||||||
|
|
||||||
# If a node used %gcc@X.Y its dependencies must use gcc-runtime@:X.Y
|
|
||||||
pkg("*").propagate(f"%gcc@:{str(spec.version)}", when=f"%{str(spec)}")
|
|
1
var/spack/repos/compiler_runtime.test/packages/glibc
Symbolic link
1
var/spack/repos/compiler_runtime.test/packages/glibc
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../builtin.mock/packages/glibc
|
1
var/spack/repos/compiler_runtime.test/packages/gmake
Symbolic link
1
var/spack/repos/compiler_runtime.test/packages/gmake
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../builtin.mock/packages/gmake
|
1
var/spack/repos/compiler_runtime.test/packages/gnuconfig
Symbolic link
1
var/spack/repos/compiler_runtime.test/packages/gnuconfig
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../builtin.mock/packages/gnuconfig
|
@ -11,3 +11,6 @@ class PkgA(Package):
|
|||||||
|
|
||||||
version("1.0")
|
version("1.0")
|
||||||
depends_on("pkg-b")
|
depends_on("pkg-b")
|
||||||
|
|
||||||
|
depends_on("c", type="build")
|
||||||
|
depends_on("cxx", type="build")
|
||||||
|
@ -10,3 +10,6 @@ class PkgB(Package):
|
|||||||
has_code = False
|
has_code = False
|
||||||
|
|
||||||
version("1.0")
|
version("1.0")
|
||||||
|
|
||||||
|
depends_on("c", type="build")
|
||||||
|
depends_on("cxx", type="build")
|
||||||
|
1
var/spack/repos/duplicates.test/packages/gcc
Symbolic link
1
var/spack/repos/duplicates.test/packages/gcc
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../builtin.mock/packages/gcc
|
1
var/spack/repos/duplicates.test/packages/gcc-runtime
Symbolic link
1
var/spack/repos/duplicates.test/packages/gcc-runtime
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../builtin.mock/packages/gcc-runtime
|
1
var/spack/repos/duplicates.test/packages/glibc
Symbolic link
1
var/spack/repos/duplicates.test/packages/glibc
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../builtin.mock/packages/glibc
|
1
var/spack/repos/duplicates.test/packages/gnuconfig
Symbolic link
1
var/spack/repos/duplicates.test/packages/gnuconfig
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../builtin.mock/packages/gnuconfig
|
1
var/spack/repos/duplicates.test/packages/llvm
Symbolic link
1
var/spack/repos/duplicates.test/packages/llvm
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../builtin.mock/packages/llvm
|
1
var/spack/repos/edges.test/packages/gcc
Symbolic link
1
var/spack/repos/edges.test/packages/gcc
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../builtin.mock/packages/gcc
|
1
var/spack/repos/edges.test/packages/gcc-runtime
Symbolic link
1
var/spack/repos/edges.test/packages/gcc-runtime
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../builtin.mock/packages/gcc-runtime
|
1
var/spack/repos/edges.test/packages/glibc
Symbolic link
1
var/spack/repos/edges.test/packages/glibc
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../builtin.mock/packages/glibc
|
1
var/spack/repos/edges.test/packages/gmake
Symbolic link
1
var/spack/repos/edges.test/packages/gmake
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../builtin.mock/packages/gmake
|
1
var/spack/repos/edges.test/packages/gnuconfig
Symbolic link
1
var/spack/repos/edges.test/packages/gnuconfig
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../builtin.mock/packages/gnuconfig
|
1
var/spack/repos/edges.test/packages/llvm
Symbolic link
1
var/spack/repos/edges.test/packages/llvm
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../builtin.mock/packages/llvm
|
1
var/spack/repos/flags.test/packages/gcc
Symbolic link
1
var/spack/repos/flags.test/packages/gcc
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../builtin.mock/packages/gcc
|
1
var/spack/repos/flags.test/packages/gcc-runtime
Symbolic link
1
var/spack/repos/flags.test/packages/gcc-runtime
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../builtin.mock/packages/gcc-runtime
|
1
var/spack/repos/flags.test/packages/glibc
Symbolic link
1
var/spack/repos/flags.test/packages/glibc
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../builtin.mock/packages/glibc
|
1
var/spack/repos/flags.test/packages/gmake
Symbolic link
1
var/spack/repos/flags.test/packages/gmake
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../builtin.mock/packages/gmake/
|
1
var/spack/repos/flags.test/packages/gnuconfig
Symbolic link
1
var/spack/repos/flags.test/packages/gnuconfig
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../builtin.mock/packages/gnuconfig
|
1
var/spack/repos/requirements.test/packages/gcc
Symbolic link
1
var/spack/repos/requirements.test/packages/gcc
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../builtin.mock/packages/gcc
|
1
var/spack/repos/requirements.test/packages/gcc-runtime
Symbolic link
1
var/spack/repos/requirements.test/packages/gcc-runtime
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../builtin.mock/packages/gcc-runtime
|
1
var/spack/repos/requirements.test/packages/glibc
Symbolic link
1
var/spack/repos/requirements.test/packages/glibc
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../builtin.mock/packages/glibc
|
1
var/spack/repos/requirements.test/packages/gmake
Symbolic link
1
var/spack/repos/requirements.test/packages/gmake
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../builtin.mock/packages/gmake/
|
1
var/spack/repos/requirements.test/packages/gnuconfig
Symbolic link
1
var/spack/repos/requirements.test/packages/gnuconfig
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../builtin.mock/packages/gnuconfig
|
1
var/spack/repos/requirements.test/packages/llvm
Symbolic link
1
var/spack/repos/requirements.test/packages/llvm
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../builtin.mock/packages/llvm
|
Loading…
Reference in New Issue
Block a user