diff options
author | Harmen Stoppels <me@harmenstoppels.nl> | 2024-08-23 09:23:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-23 09:23:25 +0200 |
commit | d40f84749716997ebe17d32159ecc097ae7b3862 (patch) | |
tree | 3460bdf1c4bfeed26b6e80b77bb705958b4cd920 /var | |
parent | ed34dfca963fef5911bcca16c964ad73eacd4074 (diff) | |
download | spack-d40f84749716997ebe17d32159ecc097ae7b3862.tar.gz spack-d40f84749716997ebe17d32159ecc097ae7b3862.tar.bz2 spack-d40f84749716997ebe17d32159ecc097ae7b3862.tar.xz spack-d40f84749716997ebe17d32159ecc097ae7b3862.zip |
Add missing MultiMethodMeta metaclass in builders (#45879)
* Add missing MultiMethodMeta metaclass in builders
and remove the Python 2 fallback option in favor of hard errors to catch
similar issues going forward.
The fallback option can cause about 10K stat calls due to use of
`realpath` in the inspect module, depending on how deep Spack itself is
nested in the file system, which is ... undesirable.
* code shuffling to avoid circular import
* more reshuffling
* move reserved variant names into variants module
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/icu4c/package.py | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/var/spack/repos/builtin/packages/icu4c/package.py b/var/spack/repos/builtin/packages/icu4c/package.py index 3cb4eb1d98..97f89cfc29 100644 --- a/var/spack/repos/builtin/packages/icu4c/package.py +++ b/var/spack/repos/builtin/packages/icu4c/package.py @@ -76,18 +76,15 @@ class Icu4c(AutotoolsPackage, MSBuildPackage): return (None, flags, None) -class BuildEnvironment: - # Need to make sure that locale is UTF-8 in order to process source - # files in UTF-8. +class AutotoolsBuilder(spack.build_systems.autotools.AutotoolsBuilder): + + configure_directory = "source" + + # Need to make sure that locale is UTF-8 in order to process source files in UTF-8. @when("@59:") def setup_build_environment(self, env): env.set("LC_ALL", "en_US.UTF-8") - -class AutotoolsBuilder(spack.build_systems.autotools.AutotoolsBuilder, BuildEnvironment): - - configure_directory = "source" - def configure_args(self): args = [] @@ -104,7 +101,12 @@ class AutotoolsBuilder(spack.build_systems.autotools.AutotoolsBuilder, BuildEnvi return args -class MSBuildBuilder(spack.build_systems.msbuild.MSBuildBuilder, BuildEnvironment): +class MSBuildBuilder(spack.build_systems.msbuild.MSBuildBuilder): + # Need to make sure that locale is UTF-8 in order to process source files in UTF-8. + @when("@59:") + def setup_build_environment(self, env): + env.set("LC_ALL", "en_US.UTF-8") + def msbuild_args(self): return [ "allinone.sln", |