-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
30 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,33 +18,18 @@ | |
|
||
# Dictionary that maps (OS, TARGET) to info for the spec | ||
SPEC_INFO = { | ||
("centos7", "x86_64"): { | ||
"spec": "[email protected]: %gcc platform=linux target=x86_64", | ||
}, | ||
("centos7", "aarch64"): { | ||
"spec": "[email protected]: %gcc platform=linux target=aarch64", | ||
}, | ||
("centos7", "ppc64le"): { | ||
"spec": "[email protected]: %gcc platform=linux target=ppc64le", | ||
}, | ||
("monterey", "x86_64"): { | ||
"spec": "[email protected]: %apple-clang platform=darwin target=x86_64", | ||
}, | ||
("ventura", "aarch64"): { | ||
"spec": "[email protected]: %apple-clang platform=darwin target=aarch64", | ||
}, | ||
("centos7", "x86_64"): {"spec": "[email protected]: %gcc platform=linux target=x86_64"}, | ||
("centos7", "aarch64"): {"spec": "[email protected]: %gcc platform=linux target=aarch64"}, | ||
("centos7", "ppc64le"): {"spec": "[email protected]: %gcc platform=linux target=ppc64le"}, | ||
("monterey", "x86_64"): {"spec": "[email protected]: %apple-clang platform=darwin target=x86_64"}, | ||
("ventura", "aarch64"): {"spec": "[email protected]: %apple-clang platform=darwin target=aarch64"}, | ||
} | ||
|
||
|
||
def compiler_entry(name, version, os, target): | ||
return { | ||
"spec": "{0}@{1}".format(name, version), | ||
"paths": { | ||
"cc": "/dev/null", | ||
"cxx": "/dev/null", | ||
"f77": "/dev/null", | ||
"fc": "/dev/null", | ||
}, | ||
"paths": {"cc": "/dev/null", "cxx": "/dev/null", "f77": "/dev/null", "fc": "/dev/null"}, | ||
"operating_system": "{0}".format(os), | ||
"target": "{0}".format(target), | ||
"modules": [], | ||
|
@@ -80,9 +65,7 @@ def tarball_hash(path): | |
s = spack.spec.Spec.from_specfile(spec_json) | ||
binaries = [] | ||
for edge in reversed( | ||
spack.traverse.traverse_edges_topo( | ||
[s], direction="children", deptype=("link", "run") | ||
) | ||
spack.traverse.traverse_edges_topo([s], direction="children", deptype=("link", "run")) | ||
): | ||
if edge.spec.external: | ||
continue | ||
|
@@ -110,10 +93,7 @@ def tarball_hash(path): | |
current_target = current_target["name"] | ||
|
||
current_hash = binary_data["gnupg"]["hash"] | ||
mirror_entry = { | ||
"spec": SPEC_INFO[(current_os, current_target)]["spec"], | ||
"binaries": binaries, | ||
} | ||
mirror_entry = {"spec": SPEC_INFO[(current_os, current_target)]["spec"], "binaries": binaries} | ||
mirror_info.append(mirror_entry) | ||
|
||
mirror_info = sorted(mirror_info, key=lambda x: x["spec"]) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,27 +15,16 @@ | |
|
||
# Dictionary that maps (OS, TARGET) to info for the spec | ||
SPEC_INFO = { | ||
("centos7", "x86_64"): { | ||
"spec": "[email protected]: %gcc platform=linux target=x86_64", | ||
}, | ||
("centos7", "aarch64"): { | ||
"spec": "[email protected]: %gcc platform=linux target=aarch64", | ||
}, | ||
("centos7", "ppc64le"): { | ||
"spec": "[email protected]: %gcc platform=linux target=ppc64le", | ||
}, | ||
("centos7", "x86_64"): {"spec": "[email protected]: %gcc platform=linux target=x86_64"}, | ||
("centos7", "aarch64"): {"spec": "[email protected]: %gcc platform=linux target=aarch64"}, | ||
("centos7", "ppc64le"): {"spec": "[email protected]: %gcc platform=linux target=ppc64le"}, | ||
} | ||
|
||
|
||
def compiler_entry(name, version, os, target): | ||
return { | ||
"spec": "{0}@{1}".format(name, version), | ||
"paths": { | ||
"cc": "/dev/null", | ||
"cxx": "/dev/null", | ||
"f77": "/dev/null", | ||
"fc": "/dev/null", | ||
}, | ||
"paths": {"cc": "/dev/null", "cxx": "/dev/null", "f77": "/dev/null", "fc": "/dev/null"}, | ||
"operating_system": "{0}".format(os), | ||
"target": "{0}".format(target), | ||
"modules": [], | ||
|
@@ -84,10 +73,7 @@ def tarball_hash(path): | |
|
||
current_hash = binary_data["patchelf"]["hash"] | ||
binaries = [("patchelf", current_hash, shas[current_hash])] | ||
mirror_entry = { | ||
"spec": SPEC_INFO[(current_os, current_target)]["spec"], | ||
"binaries": binaries, | ||
} | ||
mirror_entry = {"spec": SPEC_INFO[(current_os, current_target)]["spec"], "binaries": binaries} | ||
mirror_info.append(mirror_entry) | ||
|
||
mirror_info = sorted(mirror_info, key=lambda x: x["spec"]) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[tool.black] | ||
line-length = 99 | ||
target-version = ['py36', 'py37', 'py38', 'py39', 'py310'] | ||
skip_magic_trailing_comma = true | ||
|
||
[tool.isort] | ||
line_length = 99 | ||
profile = "black" | ||
honor_noqa = true |