diff options
Diffstat (limited to 'var/spack/repos/compiler_runtime.test')
5 files changed, 72 insertions, 0 deletions
diff --git a/var/spack/repos/compiler_runtime.test/packages/a/package.py b/var/spack/repos/compiler_runtime.test/packages/a/package.py new file mode 100644 index 0000000000..1f68aadc2f --- /dev/null +++ b/var/spack/repos/compiler_runtime.test/packages/a/package.py @@ -0,0 +1,13 @@ +# Copyright 2013-2023 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 A(Package): + homepage = "http://www.example.com" + has_code = False + + version("1.0") + depends_on("b") diff --git a/var/spack/repos/compiler_runtime.test/packages/b/package.py b/var/spack/repos/compiler_runtime.test/packages/b/package.py new file mode 100644 index 0000000000..ab9f3150e6 --- /dev/null +++ b/var/spack/repos/compiler_runtime.test/packages/b/package.py @@ -0,0 +1,12 @@ +# Copyright 2013-2023 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 B(Package): + homepage = "http://www.example.com" + has_code = False + + version("1.0") diff --git a/var/spack/repos/compiler_runtime.test/packages/gcc-runtime/package.py b/var/spack/repos/compiler_runtime.test/packages/gcc-runtime/package.py new file mode 100644 index 0000000000..61d40a2df6 --- /dev/null +++ b/var/spack/repos/compiler_runtime.test/packages/gcc-runtime/package.py @@ -0,0 +1,13 @@ +# Copyright 2013-2023 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") diff --git a/var/spack/repos/compiler_runtime.test/packages/gcc/package.py b/var/spack/repos/compiler_runtime.test/packages/gcc/package.py new file mode 100644 index 0000000000..db81066599 --- /dev/null +++ b/var/spack/repos/compiler_runtime.test/packages/gcc/package.py @@ -0,0 +1,32 @@ +# Copyright 2013-2023 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, *, compiler, 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(compiler.version)}:", + when=f"%{str(compiler.spec)}", + type="link", + description=f"If any package uses %{str(compiler.spec)}, " + f"it depends on gcc-runtime@{str(compiler.version)}:", + ) + # The version of gcc-runtime is the same as the %gcc used to "compile" it + pkg("gcc-runtime").requires(f"@={str(compiler.version)}", when=f"%{str(compiler.spec)}") diff --git a/var/spack/repos/compiler_runtime.test/repo.yaml b/var/spack/repos/compiler_runtime.test/repo.yaml new file mode 100644 index 0000000000..1be826a641 --- /dev/null +++ b/var/spack/repos/compiler_runtime.test/repo.yaml @@ -0,0 +1,2 @@ +repo: + namespace: compiler_runtime.test |