diff options
author | Massimiliano Culpo <massimiliano.culpo@gmail.com> | 2022-10-11 19:28:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-11 19:28:27 +0200 |
commit | de8c827983556f77899adad46a2c7dd46388883b (patch) | |
tree | 6e29d81249cdaf31bee76bcf603d1945a231a9c6 /share | |
parent | b594c0aee0369308810a74630a0ca948b80abef8 (diff) | |
download | spack-de8c827983556f77899adad46a2c7dd46388883b.tar.gz spack-de8c827983556f77899adad46a2c7dd46388883b.tar.bz2 spack-de8c827983556f77899adad46a2c7dd46388883b.tar.xz spack-de8c827983556f77899adad46a2c7dd46388883b.zip |
Refactor a few classes related to package repositories (#32273)
Caches used by repositories don't reference the global spack.repo.path instance
anymore, but get the repository they refer to during initialization.
Spec.virtual now use the index, and computation done to compute the index
use Repository.is_virtual_safe.
Code to construct mock packages and mock repository has been factored into
a unique MockRepositoryBuilder that is used throughout the codebase.
Add debug print for pushing and popping config scopes.
Changed spack.repo.use_repositories so that it can override or not previous repos
spack.repo.use_repositories updates spack.config.config according to the modifications done
Removed a peculiar behavior from spack.config.Configuration where push would always
bubble-up a scope named command_line if it existed
Diffstat (limited to 'share')
-rw-r--r-- | share/spack/templates/misc/coconcretization.pyt | 15 | ||||
-rw-r--r-- | share/spack/templates/mock-repository/package.pyt | 19 |
2 files changed, 19 insertions, 15 deletions
diff --git a/share/spack/templates/misc/coconcretization.pyt b/share/spack/templates/misc/coconcretization.pyt deleted file mode 100644 index cd313216d9..0000000000 --- a/share/spack/templates/misc/coconcretization.pyt +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright 2013-2022 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) - - -class Concretizationroot(Package): - url = 'fake_url' - - version('1.0') - -{% for dep in specs %} - depends_on('{{ dep }}') -{% endfor %} - diff --git a/share/spack/templates/mock-repository/package.pyt b/share/spack/templates/mock-repository/package.pyt new file mode 100644 index 0000000000..82bd50bd05 --- /dev/null +++ b/share/spack/templates/mock-repository/package.pyt @@ -0,0 +1,19 @@ +class {{ cls_name }}(Package): + homepage = "http://www.example.com" + url = "http://www.example.com/root-1.0.tar.gz" + + version("3.0", sha256='abcde') + version("2.0", sha256='abcde') + version("1.0", sha256='abcde') + +{% for dep_spec, dep_type, condition in dependencies %} +{% if dep_type and condition %} + depends_on("{{ dep_spec }}", type="{{ dep_type }}", when="{{ condition }}") +{% elif dep_type %} + depends_on("{{ dep_spec }}", type="{{ dep_type }}") +{% elif condition %} + depends_on("{{ dep_spec }}", when="{{ condition }}") +{% else %} + depends_on("{{ dep_spec }}") +{% endif %} +{% endfor %}
\ No newline at end of file |