Package-level submodule attribute: support explicit versions (#30085)

This commit is contained in:
Peter Scheibel
2022-04-22 11:02:17 -07:00
committed by GitHub
parent 013a0a04a4
commit 267da78559
5 changed files with 64 additions and 13 deletions

View File

@@ -9,6 +9,8 @@
class GitTest(Package):
"""Mock package that uses git for fetching."""
homepage = "http://www.git-fetch-example.com"
# To be set by test
git = None
submodules = True

View File

@@ -38,21 +38,20 @@ class Axom(CachedCMakePackage, CudaPackage):
git = "https://github.com/LLNL/axom.git"
tags = ['radiuss']
version('main', branch='main', submodules=True)
version('develop', branch='develop', submodules=True)
version('0.6.1', tag='v0.6.1', submodules=True)
version('0.6.0', tag='v0.6.0', submodules=True)
version('0.5.0', tag='v0.5.0', submodules=True)
version('0.4.0', tag='v0.4.0', submodules=True)
version('0.3.3', tag='v0.3.3', submodules=True)
version('0.3.2', tag='v0.3.2', submodules=True)
version('0.3.1', tag='v0.3.1', submodules=True)
version('0.3.0', tag='v0.3.0', submodules=True)
version('0.2.9', tag='v0.2.9', submodules=True)
version('main', branch='main')
version('develop', branch='develop')
version('0.6.1', tag='v0.6.1')
version('0.6.0', tag='v0.6.0')
version('0.5.0', tag='v0.5.0')
version('0.4.0', tag='v0.4.0')
version('0.3.3', tag='v0.3.3')
version('0.3.2', tag='v0.3.2')
version('0.3.1', tag='v0.3.1')
version('0.3.0', tag='v0.3.0')
version('0.2.9', tag='v0.2.9')
@property
def submodules(self):
# All git checkouts should also initialize submodules
return True
patch('scr_examples_gtest.patch', when='@0.6.0:0.6.1')