spack.package: re-export EnvironmentModifications / Prefix (#48792)
This commit is contained in:
parent
d0cbd056a8
commit
2c51b5853f
@ -60,7 +60,6 @@ class tty:
|
|||||||
)
|
)
|
||||||
from llnl.util.symlink import symlink
|
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_environment import MakeExecutable
|
||||||
from spack.build_systems.aspell_dict import AspellDictPackage
|
from spack.build_systems.aspell_dict import AspellDictPackage
|
||||||
from spack.build_systems.autotools import AutotoolsPackage
|
from spack.build_systems.autotools import AutotoolsPackage
|
||||||
@ -147,8 +146,10 @@ class tty:
|
|||||||
)
|
)
|
||||||
from spack.phase_callbacks import run_after, run_before
|
from spack.phase_callbacks import run_after, run_before
|
||||||
from spack.spec import Spec
|
from spack.spec import Spec
|
||||||
|
from spack.util.environment import EnvironmentModifications
|
||||||
from spack.util.executable import Executable, ProcessError, which, which_string
|
from spack.util.executable import Executable, ProcessError, which, which_string
|
||||||
from spack.util.filesystem import fix_darwin_install_name
|
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.variant import any_combination_of, auto_or_any_combination_of, disjoint_sets
|
||||||
from spack.version import Version, ver
|
from spack.version import Version, ver
|
||||||
|
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
from os.path import split
|
from os.path import split
|
||||||
|
|
||||||
from spack.package import *
|
from spack.package import *
|
||||||
from spack.util.environment import EnvironmentModifications
|
|
||||||
|
|
||||||
|
|
||||||
class Anaconda3(Package):
|
class Anaconda3(Package):
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
from spack.package import *
|
from spack.package import *
|
||||||
from spack.util.environment import EnvironmentModifications
|
|
||||||
|
|
||||||
|
|
||||||
class AoclDa(CMakePackage):
|
class AoclDa(CMakePackage):
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
import spack.user_environment
|
import spack.user_environment
|
||||||
from spack.package import *
|
from spack.package import *
|
||||||
from spack.pkg.builtin.clingo import Clingo
|
from spack.pkg.builtin.clingo import Clingo
|
||||||
from spack.util.environment import EnvironmentModifications
|
|
||||||
|
|
||||||
|
|
||||||
class ClingoBootstrap(Clingo):
|
class ClingoBootstrap(Clingo):
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
from spack.package import *
|
from spack.package import *
|
||||||
from spack.util.environment import EnvironmentModifications
|
|
||||||
|
|
||||||
|
|
||||||
class Conda4aarch64(Package):
|
class Conda4aarch64(Package):
|
||||||
|
@ -39,7 +39,6 @@
|
|||||||
rewrite_environ_files,
|
rewrite_environ_files,
|
||||||
write_environ,
|
write_environ,
|
||||||
)
|
)
|
||||||
from spack.util.environment import EnvironmentModifications
|
|
||||||
|
|
||||||
|
|
||||||
class FoamExtend(Package):
|
class FoamExtend(Package):
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
from spack.package import *
|
from spack.package import *
|
||||||
from spack.util.environment import EnvironmentModifications
|
|
||||||
|
|
||||||
|
|
||||||
class Freesurfer(Package):
|
class Freesurfer(Package):
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
|
|
||||||
import spack.util.environment
|
import spack.util.environment
|
||||||
from spack.package import *
|
from spack.package import *
|
||||||
from spack.util.environment import EnvironmentModifications
|
|
||||||
|
|
||||||
|
|
||||||
class Fsl(Package, CudaPackage):
|
class Fsl(Package, CudaPackage):
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
from spack.package import *
|
from spack.package import *
|
||||||
from spack.util.environment import EnvironmentModifications
|
|
||||||
|
|
||||||
|
|
||||||
class Heasoft(AutotoolsPackage):
|
class Heasoft(AutotoolsPackage):
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
import spack.build_environment
|
import spack.build_environment
|
||||||
from spack.hooks.sbang import filter_shebang
|
from spack.hooks.sbang import filter_shebang
|
||||||
from spack.package import *
|
from spack.package import *
|
||||||
from spack.util.prefix import Prefix
|
|
||||||
|
|
||||||
|
|
||||||
class Hip(CMakePackage):
|
class Hip(CMakePackage):
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
|
|
||||||
from spack.build_environment import dso_suffix
|
from spack.build_environment import dso_suffix
|
||||||
from spack.package import *
|
from spack.package import *
|
||||||
from spack.util.environment import EnvironmentModifications
|
|
||||||
|
|
||||||
versions = [
|
versions = [
|
||||||
{
|
{
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
import re
|
import re
|
||||||
|
|
||||||
from spack.package import *
|
from spack.package import *
|
||||||
from spack.util.prefix import Prefix
|
|
||||||
|
|
||||||
|
|
||||||
class Jdk(Package):
|
class Jdk(Package):
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
from os.path import split
|
from os.path import split
|
||||||
|
|
||||||
from spack.package import *
|
from spack.package import *
|
||||||
from spack.util.environment import EnvironmentModifications
|
|
||||||
|
|
||||||
|
|
||||||
class Miniconda2(Package):
|
class Miniconda2(Package):
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
from os.path import split
|
from os.path import split
|
||||||
|
|
||||||
from spack.package import *
|
from spack.package import *
|
||||||
from spack.util.environment import EnvironmentModifications
|
|
||||||
|
|
||||||
_versions = {
|
_versions = {
|
||||||
"24.7.1": {
|
"24.7.1": {
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
from os.path import split
|
from os.path import split
|
||||||
|
|
||||||
from spack.package import *
|
from spack.package import *
|
||||||
from spack.util.environment import EnvironmentModifications
|
|
||||||
|
|
||||||
_versions = {
|
_versions = {
|
||||||
"24.3.0-0": {
|
"24.3.0-0": {
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
import platform
|
import platform
|
||||||
|
|
||||||
from spack.package import *
|
from spack.package import *
|
||||||
from spack.util.prefix import Prefix
|
|
||||||
|
|
||||||
# FIXME Remove hack for polymorphic versions
|
# FIXME Remove hack for polymorphic versions
|
||||||
# This package uses a ugly hack to be able to dispatch, given the same
|
# This package uses a ugly hack to be able to dispatch, given the same
|
||||||
|
@ -46,7 +46,6 @@
|
|||||||
rewrite_environ_files,
|
rewrite_environ_files,
|
||||||
write_environ,
|
write_environ,
|
||||||
)
|
)
|
||||||
from spack.util.environment import EnvironmentModifications
|
|
||||||
|
|
||||||
|
|
||||||
class OpenfoamOrg(Package):
|
class OpenfoamOrg(Package):
|
||||||
|
@ -45,7 +45,6 @@
|
|||||||
|
|
||||||
from spack.package import *
|
from spack.package import *
|
||||||
from spack.pkg.builtin.boost import Boost
|
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
|
# Not the nice way of doing things, but is a start for refactoring
|
||||||
__all__ = [
|
__all__ = [
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
import re
|
import re
|
||||||
|
|
||||||
from spack.package import *
|
from spack.package import *
|
||||||
from spack.util.prefix import Prefix
|
|
||||||
|
|
||||||
# If you need to add a new version, please be aware that:
|
# If you need to add a new version, please be aware that:
|
||||||
# - versions in the following dict are automatically added to the package
|
# - versions in the following dict are automatically added to the package
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
import spack.paths
|
import spack.paths
|
||||||
from spack.build_environment import dso_suffix, stat_suffix
|
from spack.build_environment import dso_suffix, stat_suffix
|
||||||
from spack.package import *
|
from spack.package import *
|
||||||
from spack.util.prefix import Prefix
|
|
||||||
|
|
||||||
|
|
||||||
def make_pyvenv_cfg(python_spec: Spec, venv_prefix: str) -> str:
|
def make_pyvenv_cfg(python_spec: Spec, venv_prefix: str) -> str:
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import spack.util.environment
|
|
||||||
from spack.operating_systems.mac_os import macos_version
|
from spack.operating_systems.mac_os import macos_version
|
||||||
from spack.package import *
|
from spack.package import *
|
||||||
from spack.util.environment import is_system_path
|
from spack.util.environment import is_system_path
|
||||||
@ -848,9 +847,7 @@ def setup_run_environment(self, env):
|
|||||||
if "+rpath" not in self.spec:
|
if "+rpath" not in self.spec:
|
||||||
env.prepend_path(self.root_library_path, self.prefix.lib.root)
|
env.prepend_path(self.root_library_path, self.prefix.lib.root)
|
||||||
|
|
||||||
def setup_dependent_build_environment(
|
def setup_dependent_build_environment(self, env: EnvironmentModifications, dependent_spec):
|
||||||
self, env: spack.util.environment.EnvironmentModifications, dependent_spec
|
|
||||||
):
|
|
||||||
env.set("ROOTSYS", self.prefix)
|
env.set("ROOTSYS", self.prefix)
|
||||||
env.set("ROOT_VERSION", "v{0}".format(self.version.up_to(1)))
|
env.set("ROOT_VERSION", "v{0}".format(self.version.up_to(1)))
|
||||||
env.prepend_path("PYTHONPATH", self.prefix.lib.root)
|
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
|
# Newer deployment targets cause fatal errors in rootcling
|
||||||
env.unset("MACOSX_DEPLOYMENT_TARGET")
|
env.unset("MACOSX_DEPLOYMENT_TARGET")
|
||||||
|
|
||||||
def setup_dependent_run_environment(
|
def setup_dependent_run_environment(self, env: EnvironmentModifications, dependent_spec):
|
||||||
self, env: spack.util.environment.EnvironmentModifications, dependent_spec
|
|
||||||
):
|
|
||||||
env.prepend_path("ROOT_INCLUDE_PATH", dependent_spec.prefix.include)
|
env.prepend_path("ROOT_INCLUDE_PATH", dependent_spec.prefix.include)
|
||||||
# For dependents that build dictionaries, ROOT needs to know where the
|
# For dependents that build dictionaries, ROOT needs to know where the
|
||||||
# dictionaries have been installed. This can be facilitated by
|
# dictionaries have been installed. This can be facilitated by
|
||||||
|
Loading…
Reference in New Issue
Block a user