Avoid hidden circular dependencies in spack.architecture (#25873)

* Refactor platform etc. to avoid circular dependencies

All the base classes in spack.architecture have been
moved to the corresponding specialized subpackages,
e.g. Platform is now defined within spack.platforms.

This resolves a circular dependency where spack.architecture
was both:
- Defining the base classes for spack.platforms, etc.
- Collecting derived classes from spack.platforms, etc.
Now it dopes only the latter.

* Move a few platform related functions to "spack.platforms"

* Removed spack.architecture.sys_type()

* Fixup for docs

* Rename Python modules according to review
This commit is contained in:
Massimiliano Culpo
2021-09-13 20:04:42 +02:00
committed by GitHub
parent 060582a21d
commit e9f1cfdaaf
23 changed files with 492 additions and 478 deletions

View File

@@ -2,11 +2,8 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
import spack.architecture
from spack import *
@@ -111,8 +108,8 @@ def configure_args(self):
# Versions < 2.1.1 have a bug in the test code that *sometimes*
# causes problems on strict alignment architectures such as
# aarch64. Work-around is to just not build the test code.
if 'aarch64' in spack.architecture.sys_type() and \
self.spec.version < Version('2.1.1'):
if (self.spec.satisfies('target=aarch64:') and
self.spec.version < Version('2.1.1')):
config_args.append('--without-tests-examples')
# Versions >= 3.0 also use hwloc