Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove DetectedPackage #619

Merged
merged 1 commit into from
Sep 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions manager/manager_cmds/external.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

import spack
import spack.config
import spack.detection
import spack.environment as ev
import spack.util.spack_yaml as syaml
from spack.detection.common import _pkg_config_dict
Expand Down Expand Up @@ -46,11 +45,11 @@ def create_external_detected_spec(env, spec):
return None
# attempt to return a valid spec using the current spack instance
try:
return spack.detection.DetectedPackage(Spec.from_detection(pruned_spec), prefix)
return Spec.from_detection(pruned_spec, external_path=prefix)
except spack.variant.UnknownVariantError:
# if it is an old spec then a variant could have changed so we just create a spec from the
# pruned_spec string
return spack.detection.DetectedPackage(Spec(pruned_spec), prefix)
return Spec(pruned_spec, external_path=prefix)


def assemble_dict_of_detected_externals(env, exclude, include):
Expand Down
Loading