package_base.py: do not depend on spack.environment (#46424)
This commit is contained in:
parent
673565aefe
commit
623c5a4d24
@ -40,7 +40,6 @@
|
|||||||
import spack.dependency
|
import spack.dependency
|
||||||
import spack.deptypes as dt
|
import spack.deptypes as dt
|
||||||
import spack.directives
|
import spack.directives
|
||||||
import spack.environment
|
|
||||||
import spack.error
|
import spack.error
|
||||||
import spack.fetch_strategy as fs
|
import spack.fetch_strategy as fs
|
||||||
import spack.hooks
|
import spack.hooks
|
||||||
@ -1700,8 +1699,7 @@ def content_hash(self, content=None):
|
|||||||
# should this attempt to download the source and set one? This
|
# should this attempt to download the source and set one? This
|
||||||
# probably only happens for source repositories which are
|
# probably only happens for source repositories which are
|
||||||
# referenced by branch name rather than tag or commit ID.
|
# referenced by branch name rather than tag or commit ID.
|
||||||
env = spack.environment.active_environment()
|
from_local_sources = "dev_path" in self.spec.variants
|
||||||
from_local_sources = env and env.is_develop(self.spec)
|
|
||||||
if self.has_code and not self.spec.external and not from_local_sources:
|
if self.has_code and not self.spec.external and not from_local_sources:
|
||||||
message = "Missing a source id for {s.name}@{s.version}"
|
message = "Missing a source id for {s.name}@{s.version}"
|
||||||
tty.debug(message.format(s=self))
|
tty.debug(message.format(s=self))
|
||||||
|
Loading…
Reference in New Issue
Block a user