summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHarmen Stoppels <me@harmenstoppels.nl>2024-09-17 14:43:03 +0200
committerGitHub <noreply@github.com>2024-09-17 14:43:03 +0200
commit623c5a4d2491a0d6781154abc6d8886e771f7f4e (patch)
tree516c115bdec1367d7df6c448da17be6e3a3b8763 /lib
parent673565aefe79f4c8c4aec8ab61fb07c57c2a7ced (diff)
downloadspack-623c5a4d2491a0d6781154abc6d8886e771f7f4e.tar.gz
spack-623c5a4d2491a0d6781154abc6d8886e771f7f4e.tar.bz2
spack-623c5a4d2491a0d6781154abc6d8886e771f7f4e.tar.xz
spack-623c5a4d2491a0d6781154abc6d8886e771f7f4e.zip
package_base.py: do not depend on spack.environment (#46424)
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/package_base.py4
1 files changed, 1 insertions, 3 deletions
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))