From 623c5a4d2491a0d6781154abc6d8886e771f7f4e Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Tue, 17 Sep 2024 14:43:03 +0200 Subject: package_base.py: do not depend on spack.environment (#46424) --- lib/spack/spack/package_base.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/spack/spack/package_base.py b/lib/spack/spack/package_base.py index e2c7069ef8..c539cf1e0e 100644 --- a/lib/spack/spack/package_base.py +++ b/lib/spack/spack/package_base.py @@ -40,7 +40,6 @@ import spack.config import spack.dependency import spack.deptypes as dt import spack.directives -import spack.environment import spack.error import spack.fetch_strategy as fs import spack.hooks @@ -1700,8 +1699,7 @@ class PackageBase(WindowsRPath, PackageViewMixin, RedistributionMixin, metaclass # should this attempt to download the source and set one? This # probably only happens for source repositories which are # referenced by branch name rather than tag or commit ID. - env = spack.environment.active_environment() - from_local_sources = env and env.is_develop(self.spec) + from_local_sources = "dev_path" in self.spec.variants if self.has_code and not self.spec.external and not from_local_sources: message = "Missing a source id for {s.name}@{s.version}" tty.debug(message.format(s=self)) -- cgit v1.2.3-70-g09d2