summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin.mock/packages/nosource-install/package.py
blob: a1ca72444892bf5d8e796907cb6ffffb900692e1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Copyright 2013-2022 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 NosourceInstall(BundlePackage):
    """Simple bundle package with one dependency and metadata 'install'."""

    homepage = "http://www.example.com"

    version("2.0")
    version("1.0")

    depends_on("dependency-install")

    # The install phase must be specified.
    phases = ["install"]

    # The install method must also be present.
    def install(self, spec, prefix):
        touch(join_path(self.prefix, "install.txt"))

    @run_after("install")
    def post_install(self):
        touch(join_path(self.prefix, "post-install.txt"))