Compare commits
4 Commits
develop
...
devtools-r
Author | SHA1 | Date | |
---|---|---|---|
![]() |
ddc5dc7da3 | ||
![]() |
0663ac3633 | ||
![]() |
f80df0ca47 | ||
![]() |
367abcb801 |
@ -1016,10 +1016,16 @@ def get_env_modifications(self) -> EnvironmentModifications:
|
|||||||
self._make_runnable(dspec, env)
|
self._make_runnable(dspec, env)
|
||||||
|
|
||||||
if self.should_setup_run_env & flag:
|
if self.should_setup_run_env & flag:
|
||||||
|
run_env_mods = EnvironmentModifications()
|
||||||
for spec in dspec.dependents(deptype=dt.LINK | dt.RUN):
|
for spec in dspec.dependents(deptype=dt.LINK | dt.RUN):
|
||||||
if id(spec) in self.nodes_in_subdag:
|
if id(spec) in self.nodes_in_subdag:
|
||||||
pkg.setup_dependent_run_environment(env, spec)
|
pkg.setup_dependent_run_environment(run_env_mods, spec)
|
||||||
pkg.setup_run_environment(env)
|
pkg.setup_run_environment(run_env_mods)
|
||||||
|
run_env_dict = run_env_mods.group_by_name()
|
||||||
|
if self.context == Context.BUILD:
|
||||||
|
run_env_mods.drop("CC", "CXX", "F77", "FC")
|
||||||
|
env.extend(run_env_mods)
|
||||||
|
|
||||||
return env
|
return env
|
||||||
|
|
||||||
def _make_buildtime_detectable(self, dep: spack.spec.Spec, env: EnvironmentModifications):
|
def _make_buildtime_detectable(self, dep: spack.spec.Spec, env: EnvironmentModifications):
|
||||||
|
@ -596,6 +596,14 @@ def group_by_name(self) -> Dict[str, ModificationList]:
|
|||||||
modifications[item.name].append(item)
|
modifications[item.name].append(item)
|
||||||
return modifications
|
return modifications
|
||||||
|
|
||||||
|
def drop(self, *name) -> bool:
|
||||||
|
"""Drop all modifications to the variable with the given name."""
|
||||||
|
old_mods = self.env_modifications
|
||||||
|
new_mods = [x for x in self.env_modifications if x.name not in name]
|
||||||
|
self.env_modifications = new_mods
|
||||||
|
|
||||||
|
return len(old_mods) != len(new_mods)
|
||||||
|
|
||||||
def is_unset(self, variable_name: str) -> bool:
|
def is_unset(self, variable_name: str) -> bool:
|
||||||
"""Returns True if the last modification to a variable is to unset it, False otherwise."""
|
"""Returns True if the last modification to a variable is to unset it, False otherwise."""
|
||||||
modifications = self.group_by_name()
|
modifications = self.group_by_name()
|
||||||
|
@ -977,7 +977,9 @@ def post_install(self):
|
|||||||
ninja()
|
ninja()
|
||||||
ninja("install")
|
ninja("install")
|
||||||
if "+python" in self.spec:
|
if "+python" in self.spec:
|
||||||
install_tree("llvm/bindings/python", python_platlib)
|
if spec.version < Version("17.0.0"):
|
||||||
|
# llvm bindings were removed in v17: https://releases.llvm.org/17.0.1/docs/ReleaseNotes.html#changes-to-the-python-bindings
|
||||||
|
install_tree("llvm/bindings/python", python_platlib)
|
||||||
|
|
||||||
if "+clang" in self.spec:
|
if "+clang" in self.spec:
|
||||||
install_tree("clang/bindings/python", python_platlib)
|
install_tree("clang/bindings/python", python_platlib)
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
import os
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from spack.package import *
|
from spack.package import *
|
||||||
@ -92,8 +93,20 @@ def setup_build_environment(self, env):
|
|||||||
env.set("AR", ar.path)
|
env.set("AR", ar.path)
|
||||||
|
|
||||||
# Manually inject the path of openssl's certs for build.
|
# Manually inject the path of openssl's certs for build.
|
||||||
certs = join_path(self.spec["openssl"].prefix, "etc/openssl/cert.pem")
|
certs = None
|
||||||
env.set("CARGO_HTTP_CAINFO", certs)
|
for p in (
|
||||||
|
"etc/openssl/cert.pem",
|
||||||
|
"../etc/openssl/cert.pem",
|
||||||
|
"etc/ssl/certs/ca-bundle.crt",
|
||||||
|
"../etc/ssl/certs/ca-bundle.crt",
|
||||||
|
):
|
||||||
|
certs = join_path(self.spec["openssl"].prefix, p)
|
||||||
|
if os.path.exists(certs):
|
||||||
|
break
|
||||||
|
else:
|
||||||
|
certs = None
|
||||||
|
if certs is not None:
|
||||||
|
env.set("CARGO_HTTP_CAINFO", certs)
|
||||||
|
|
||||||
def configure(self, spec, prefix):
|
def configure(self, spec, prefix):
|
||||||
opts = []
|
opts = []
|
||||||
|
Loading…
Reference in New Issue
Block a user