spack.package: re-export EnvironmentModifications / Prefix (#48792)

This commit is contained in:
Harmen Stoppels 2025-01-31 08:20:15 +01:00 committed by GitHub
parent d0cbd056a8
commit 2c51b5853f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
21 changed files with 4 additions and 27 deletions

View File

@ -60,7 +60,6 @@ class tty:
)
from llnl.util.symlink import symlink
# These props will be overridden when the build env is set up.
from spack.build_environment import MakeExecutable
from spack.build_systems.aspell_dict import AspellDictPackage
from spack.build_systems.autotools import AutotoolsPackage
@ -147,8 +146,10 @@ class tty:
)
from spack.phase_callbacks import run_after, run_before
from spack.spec import Spec
from spack.util.environment import EnvironmentModifications
from spack.util.executable import Executable, ProcessError, which, which_string
from spack.util.filesystem import fix_darwin_install_name
from spack.util.prefix import Prefix
from spack.variant import any_combination_of, auto_or_any_combination_of, disjoint_sets
from spack.version import Version, ver

View File

@ -6,7 +6,6 @@
from os.path import split
from spack.package import *
from spack.util.environment import EnvironmentModifications
class Anaconda3(Package):

View File

@ -5,7 +5,6 @@
import os
from spack.package import *
from spack.util.environment import EnvironmentModifications
class AoclDa(CMakePackage):

View File

@ -8,7 +8,6 @@
import spack.user_environment
from spack.package import *
from spack.pkg.builtin.clingo import Clingo
from spack.util.environment import EnvironmentModifications
class ClingoBootstrap(Clingo):

View File

@ -3,7 +3,6 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
from spack.util.environment import EnvironmentModifications
class Conda4aarch64(Package):

View File

@ -39,7 +39,6 @@
rewrite_environ_files,
write_environ,
)
from spack.util.environment import EnvironmentModifications
class FoamExtend(Package):

View File

@ -6,7 +6,6 @@
import os
from spack.package import *
from spack.util.environment import EnvironmentModifications
class Freesurfer(Package):

View File

@ -7,7 +7,6 @@
import spack.util.environment
from spack.package import *
from spack.util.environment import EnvironmentModifications
class Fsl(Package, CudaPackage):

View File

@ -5,7 +5,6 @@
import os
from spack.package import *
from spack.util.environment import EnvironmentModifications
class Heasoft(AutotoolsPackage):

View File

@ -8,7 +8,6 @@
import spack.build_environment
from spack.hooks.sbang import filter_shebang
from spack.package import *
from spack.util.prefix import Prefix
class Hip(CMakePackage):

View File

@ -7,7 +7,6 @@
from spack.build_environment import dso_suffix
from spack.package import *
from spack.util.environment import EnvironmentModifications
versions = [
{

View File

@ -6,7 +6,6 @@
import re
from spack.package import *
from spack.util.prefix import Prefix
class Jdk(Package):

View File

@ -5,7 +5,6 @@
from os.path import split
from spack.package import *
from spack.util.environment import EnvironmentModifications
class Miniconda2(Package):

View File

@ -6,7 +6,6 @@
from os.path import split
from spack.package import *
from spack.util.environment import EnvironmentModifications
_versions = {
"24.7.1": {

View File

@ -6,7 +6,6 @@
from os.path import split
from spack.package import *
from spack.util.environment import EnvironmentModifications
_versions = {
"24.3.0-0": {

View File

@ -7,7 +7,6 @@
import platform
from spack.package import *
from spack.util.prefix import Prefix
# FIXME Remove hack for polymorphic versions
# This package uses a ugly hack to be able to dispatch, given the same

View File

@ -46,7 +46,6 @@
rewrite_environ_files,
write_environ,
)
from spack.util.environment import EnvironmentModifications
class OpenfoamOrg(Package):

View File

@ -45,7 +45,6 @@
from spack.package import *
from spack.pkg.builtin.boost import Boost
from spack.util.environment import EnvironmentModifications
# Not the nice way of doing things, but is a start for refactoring
__all__ = [

View File

@ -7,7 +7,6 @@
import re
from spack.package import *
from spack.util.prefix import Prefix
# If you need to add a new version, please be aware that:
# - versions in the following dict are automatically added to the package

View File

@ -17,7 +17,6 @@
import spack.paths
from spack.build_environment import dso_suffix, stat_suffix
from spack.package import *
from spack.util.prefix import Prefix
def make_pyvenv_cfg(python_spec: Spec, venv_prefix: str) -> str:

View File

@ -6,7 +6,6 @@
import os
import sys
import spack.util.environment
from spack.operating_systems.mac_os import macos_version
from spack.package import *
from spack.util.environment import is_system_path
@ -848,9 +847,7 @@ def setup_run_environment(self, env):
if "+rpath" not in self.spec:
env.prepend_path(self.root_library_path, self.prefix.lib.root)
def setup_dependent_build_environment(
self, env: spack.util.environment.EnvironmentModifications, dependent_spec
):
def setup_dependent_build_environment(self, env: EnvironmentModifications, dependent_spec):
env.set("ROOTSYS", self.prefix)
env.set("ROOT_VERSION", "v{0}".format(self.version.up_to(1)))
env.prepend_path("PYTHONPATH", self.prefix.lib.root)
@ -863,9 +860,7 @@ def setup_dependent_build_environment(
# Newer deployment targets cause fatal errors in rootcling
env.unset("MACOSX_DEPLOYMENT_TARGET")
def setup_dependent_run_environment(
self, env: spack.util.environment.EnvironmentModifications, dependent_spec
):
def setup_dependent_run_environment(self, env: EnvironmentModifications, dependent_spec):
env.prepend_path("ROOT_INCLUDE_PATH", dependent_spec.prefix.include)
# For dependents that build dictionaries, ROOT needs to know where the
# dictionaries have been installed. This can be facilitated by