core changes to allow setting git/url attribute on packages
This commit is contained in:
committed by
Gregory Becker
parent
d7cb790f88
commit
a8fa5f6ca1
@@ -1362,6 +1362,11 @@ def get_pkg_class(self, pkg_name):
|
||||
if not inspect.isclass(cls):
|
||||
tty.die("%s.%s is not a class" % (pkg_name, class_name))
|
||||
|
||||
# packages.yaml config can override package attributes
|
||||
settings = spack.config.get("packages").get(pkg_name, {}).get("set", {})
|
||||
for key, val in settings.items():
|
||||
setattr(cls, key, val)
|
||||
|
||||
return cls
|
||||
|
||||
def __str__(self):
|
||||
|
||||
@@ -82,6 +82,23 @@
|
||||
},
|
||||
},
|
||||
},
|
||||
# If 'get_full_repo' is promoted to a Package-level
|
||||
# attribute, it could be useful to set it here
|
||||
"set": {
|
||||
"type": "object",
|
||||
"additionalProperties": False,
|
||||
"properties": {
|
||||
"git": {
|
||||
"type": "string",
|
||||
},
|
||||
"url": {
|
||||
"type": "string",
|
||||
},
|
||||
"submodules": {
|
||||
"type": "boolean",
|
||||
},
|
||||
},
|
||||
},
|
||||
"providers": {
|
||||
"type": "object",
|
||||
"default": {},
|
||||
|
||||
Reference in New Issue
Block a user