Compare commits
2 Commits
develop
...
assess_uni
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f04f7bd6af | ||
![]() |
062d3643b2 |
@ -146,6 +146,7 @@ def libc_external_spec(self) -> "spack.spec.Spec":
|
|||||||
return self._external_spec(result)
|
return self._external_spec(result)
|
||||||
|
|
||||||
def _external_spec(self, initial_spec) -> "spack.spec.Spec":
|
def _external_spec(self, initial_spec) -> "spack.spec.Spec":
|
||||||
|
#TODO: Does this need to be changed?
|
||||||
initial_spec.namespace = "builtin"
|
initial_spec.namespace = "builtin"
|
||||||
initial_spec.compiler = self.host_compiler.spec
|
initial_spec.compiler = self.host_compiler.spec
|
||||||
initial_spec.architecture = self.host_architecture
|
initial_spec.architecture = self.host_architecture
|
||||||
|
@ -958,6 +958,7 @@ def fullnames(cls):
|
|||||||
namespace = getattr(cls, "namespace", None)
|
namespace = getattr(cls, "namespace", None)
|
||||||
if namespace:
|
if namespace:
|
||||||
fullnames.append("%s.%s" % (namespace, cls.name))
|
fullnames.append("%s.%s" % (namespace, cls.name))
|
||||||
|
#TODO: Does this need to be changed?
|
||||||
if namespace == "builtin":
|
if namespace == "builtin":
|
||||||
# builtin packages cannot inherit from other repos
|
# builtin packages cannot inherit from other repos
|
||||||
break
|
break
|
||||||
|
@ -58,7 +58,10 @@
|
|||||||
|
|
||||||
# read-only things in $spack/var/spack
|
# read-only things in $spack/var/spack
|
||||||
repos_path = os.path.join(var_path, "repos")
|
repos_path = os.path.join(var_path, "repos")
|
||||||
|
|
||||||
|
#TODO: How do we want to replace this?
|
||||||
packages_path = os.path.join(repos_path, "builtin")
|
packages_path = os.path.join(repos_path, "builtin")
|
||||||
|
|
||||||
mock_packages_path = os.path.join(repos_path, "builtin.mock")
|
mock_packages_path = os.path.join(repos_path, "builtin.mock")
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -57,7 +57,7 @@ def python_package_for_repo(namespace):
|
|||||||
|
|
||||||
For instance:
|
For instance:
|
||||||
|
|
||||||
python_package_for_repo('builtin') == 'spack.pkg.builtin'
|
python_package_for_repo('builtin.mock') == 'spack.pkg.builtin.mock'
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
namespace (str): repo namespace
|
namespace (str): repo namespace
|
||||||
@ -70,7 +70,7 @@ def namespace_from_fullname(fullname):
|
|||||||
|
|
||||||
For instance:
|
For instance:
|
||||||
|
|
||||||
namespace_from_fullname('spack.pkg.builtin.hdf5') == 'builtin'
|
namespace_from_fullname('spack.pkg.builtin.mock.hdf5') == 'builtin.mock'
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
fullname (str): full name for the Python module
|
fullname (str): full name for the Python module
|
||||||
@ -183,7 +183,10 @@ def packages_path():
|
|||||||
try:
|
try:
|
||||||
return PATH.get_repo("builtin.mock").packages_path
|
return PATH.get_repo("builtin.mock").packages_path
|
||||||
except UnknownNamespaceError:
|
except UnknownNamespaceError:
|
||||||
return PATH.get_repo("builtin").packages_path
|
#TODO: Replace this with the approach needed to ensure using the new
|
||||||
|
#TODO: built-in repository option
|
||||||
|
#return PATH.get_repo("builtin").packages_path
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
class GitExe:
|
class GitExe:
|
||||||
|
@ -2266,6 +2266,7 @@ def to_node_dict(self, hash=ht.dag_hash):
|
|||||||
)
|
)
|
||||||
return d
|
return d
|
||||||
|
|
||||||
|
#TODO: Does the example namespace need to change from builtin?
|
||||||
def to_dict(self, hash=ht.dag_hash):
|
def to_dict(self, hash=ht.dag_hash):
|
||||||
"""Create a dictionary suitable for writing this spec to YAML or JSON.
|
"""Create a dictionary suitable for writing this spec to YAML or JSON.
|
||||||
|
|
||||||
|
@ -114,7 +114,7 @@ def test_package_audits(packages, expected_errors, mock_packages):
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
def test_config_audits(config_section, data, failing_check):
|
def test_config_audits(config_section, data, failing_check, mock_packages):
|
||||||
with spack.config.override(config_section, data):
|
with spack.config.override(config_section, data):
|
||||||
reports = spack.audit.run_group("configs")
|
reports = spack.audit.run_group("configs")
|
||||||
assert any((check == failing_check) and errors for check, errors in reports)
|
assert any((check == failing_check) and errors for check, errors in reports)
|
||||||
|
15
var/spack/repos/builtin.mock/packages/openssl/package.py
Normal file
15
var/spack/repos/builtin.mock/packages/openssl/package.py
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
|
||||||
|
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
from spack.package import *
|
||||||
|
|
||||||
|
|
||||||
|
class Openssl(Package):
|
||||||
|
version("3.4.0")
|
||||||
|
|
||||||
|
#variant("internal-hwloc", default=False)
|
||||||
|
#variant("fabrics", values=any_combination_of("psm", "mxm"))
|
||||||
|
|
||||||
|
#depends_on("hwloc", when="~internal-hwloc")
|
Loading…
Reference in New Issue
Block a user