rename 'set' to 'package_attributes'
This commit is contained in:
committed by
Gregory Becker
parent
bb079ee356
commit
a92eacd3c8
@@ -697,7 +697,7 @@ def __init__(self, spec):
|
||||
# packages.yaml config can override package attributes. This is set
|
||||
# on the instance rather than the class since the configuration can
|
||||
# change between calls to repo.get for the same package.
|
||||
settings = spack.config.get("packages").get(spec.name, {}).get("set", {})
|
||||
settings = spack.config.get("packages").get(spec.name, {}).get("package_attributes", {})
|
||||
for key, val in settings.items():
|
||||
setattr(self, key, val)
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
},
|
||||
# If 'get_full_repo' is promoted to a Package-level
|
||||
# attribute, it could be useful to set it here
|
||||
"set": {
|
||||
"package_attributes": {
|
||||
"type": "object",
|
||||
"additionalProperties": False,
|
||||
"properties": {
|
||||
|
||||
@@ -184,12 +184,12 @@ def test_config_set_url_for_package(self, mutable_mock_repo):
|
||||
applied correctly
|
||||
"""
|
||||
update_packages(
|
||||
"mpileaks", "set", {"url": "http://www.somewhereelse.com/mpileaks-1.0.tar.gz"}
|
||||
"mpileaks", "package_attributes", {"url": "http://www.somewhereelse.com/mpileaks-1.0.tar.gz"}
|
||||
)
|
||||
spec = concretize("mpileaks")
|
||||
assert spec.package.fetcher[0].url == "http://www.somewhereelse.com/mpileaks-2.3.tar.gz"
|
||||
|
||||
update_packages("mpileaks", "set", {})
|
||||
update_packages("mpileaks", "package_attributes", {})
|
||||
spec = concretize("mpileaks")
|
||||
assert spec.package.fetcher[0].url == "http://www.llnl.gov/mpileaks-2.3.tar.gz"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user