Ad-hoc Git commit versions: support submodules (#30037)

* Allow packages to add a 'submodules' property that determines when ad-hoc Git-commit-based versions should initialize submodules

* add support for ad-hoc git-commit-based versions to instantiate submodules if the associated package has a 'submodules' property and it indicates this should happen for the associated spec

* allow Package-level submodule request to influence all explicitly-defined version() in the Package

* skip test on windows which fails because of long paths
This commit is contained in:
Peter Scheibel
2022-04-13 20:05:14 -07:00
committed by GitHub
parent b28b24ccf8
commit 89f6db21f1
5 changed files with 90 additions and 11 deletions

View File

@@ -10,4 +10,6 @@ class GitTest(Package):
"""Mock package that uses git for fetching."""
homepage = "http://www.git-fetch-example.com"
submodules = True
version('git', git='to-be-filled-in-by-test')

View File

@@ -50,6 +50,11 @@ class Axom(CachedCMakePackage, CudaPackage):
version('0.3.0', tag='v0.3.0', submodules=True)
version('0.2.9', tag='v0.2.9', submodules=True)
@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')
root_cmakelists_dir = 'src'