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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
# Copyright 2013-2019 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 import *
import os
class HashTest1(Package):
"""Used to test package hashing
"""
homepage = "http://www.hashtest1.org"
url = "http://www.hashtest1.org/downloads/hashtest1-1.1.tar.bz2"
version('1.1', 'a' * 32)
version('1.2', 'b' * 32)
version('1.3', 'c' * 32)
version('1.4', 'd' * 32)
version('1.5', 'd' * 32)
version('1.6', 'e' * 32)
version('1.7', 'f' * 32)
patch('patch1.patch', when="@1.1")
patch('patch2.patch', when="@1.4")
variant('variantx', default=False, description='Test variant X')
variant('varianty', default=False, description='Test variant Y')
def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
pass
@when('@:1.4')
def install(self, spec, prefix):
print("install 1")
os.listdir(os.getcwd())
@when('@1.5:')
def install(self, spec, prefix):
os.listdir(os.getcwd())
@when('@1.5,1.6')
def extra_phase(self, spec, prefix):
pass
|