Skip to content

Commit

Permalink
scripting: add globals for store.STORE (#390)
Browse files Browse the repository at this point in the history
  • Loading branch information
alecbcs committed Aug 7, 2024
1 parent 9c7a545 commit 0cd345d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion outputs/scripting/0.find_exclude.py.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import sys
include_spec = Spec(sys.argv[1])
exclude_spec = Spec(sys.argv[2])

all_included = spack.store.db.query(include_spec)
all_included = spack.store.STORE.db.query(include_spec)
result = filter(lambda spec: not spec.satisfies(exclude_spec), all_included)

spack.cmd.display_specs(result)
2 changes: 1 addition & 1 deletion outputs/scripting/1.find_exclude.py.example
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import sys
include_spec = Spec(sys.argv[1])
exclude_spec = Spec(sys.argv[2])

all_included = spack.store.db.query(include_spec)
all_included = spack.store.STORE.db.query(include_spec)
result = filter(lambda spec: not spec.satisfies(exclude_spec), all_included)

spack.cmd.display_specs(result)
2 changes: 1 addition & 1 deletion outputs/scripting/2.find_exclude.py.example
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import sys
include_spec = Spec(sys.argv[1])
exclude_spec = Spec(sys.argv[2])

all_included = spack.store.db.query(include_spec)
all_included = spack.store.STORE.db.query(include_spec)
result = filter(lambda spec: not spec.satisfies(exclude_spec), all_included)

spack.cmd.display_specs(result)
2 changes: 1 addition & 1 deletion outputs/scripting/spack-python-db-query-exclude.out
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
>>> gcc_query_spec = Spec('%gcc')
>>> gcc_specs = spack.store.db.query(gcc_query_spec)
>>> gcc_specs = spack.store.STORE.db.query(gcc_query_spec)
>>> result = filter(lambda spec: not spec.satisfies('^mpich'), gcc_specs)
>>> import spack.cmd
>>> spack.cmd.display_specs(result)
Expand Down

0 comments on commit 0cd345d

Please sign in to comment.