blob: 26e0e099972a268f7ba067a2903320d8c043146b (
plain) (
tree)
|
|
# 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)
import spack.pkg.builtin.mock.python as mp
from spack.package import *
class PyTestCallback(mp.Python):
"""A package for testing stand-alone test methods as a callback."""
homepage = "http://www.example.com"
url = "http://www.example.com/test-callback-1.0.tar.gz"
# TODO (post-34236): "test" -> "test_callback" once remove "test" support
install_time_test_callbacks = ["test"]
version("1.0", "00000000000000000000000000000110")
version("2.0", "00000000000000000000000000000120")
def install(self, spec, prefix):
mkdirp(prefix.bin)
# TODO (post-34236): "test" -> "test_callback" once remove "test" support
def test(self):
super(PyTestCallback, self).test()
print("PyTestCallback test")
|