new mock packages

This commit is contained in:
kshea21 2025-02-19 16:50:26 -08:00 committed by Gregory Becker
parent e687bb902f
commit e3d3230c9b
No known key found for this signature in database
GPG Key ID: 2362541F6D14ED84
3 changed files with 81 additions and 0 deletions

View File

@ -0,0 +1,29 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import time
from llnl.util.filesystem import touch
from spack.package import *
class ParallelPackageA(Package):
"""This is a fake vtk-m package used to demonstrate virtual package providers
with dependencies."""
homepage = "http://www.example.com"
has_code = False
depends_on("parallel-package-b")
depends_on("parallel-package-c")
version("1.0")
def install(self, spec, prefix):
print("I'm building!")
time.sleep(2)
print("I'm done!")
touch(prefix.dummy_file)

View File

@ -0,0 +1,26 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import time
from llnl.util.filesystem import touch
from spack.package import *
class ParallelPackageB(Package):
"""This is a fake vtk-m package used to demonstrate virtual package providers
with dependencies."""
homepage = "http://www.example.com"
has_code = False
version("1.0")
def install(self, spec, prefix):
print("I'm building!")
time.sleep(6)
print("I'm done!")
touch(prefix.dummy_file)

View File

@ -0,0 +1,26 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import time
from llnl.util.filesystem import touch
from spack.package import *
class ParallelPackageC(Package):
"""This is a fake vtk-m package used to demonstrate virtual package providers
with dependencies."""
homepage = "http://www.example.com"
has_code = False
version("1.0")
def install(self, spec, prefix):
print("Package 3 building!")
time.sleep(2)
print("Ideally shouldnt get here and it should fail")
touch(prefix.dummy_file)