Fix for SPACK-49.
- name conflict in imp.load_source caused this to fail. - Python modules loaded by imp have unique names now.
This commit is contained in:
parent
08f1701e35
commit
5cd4ddaf08
@ -26,7 +26,7 @@
|
|||||||
import tempfile
|
import tempfile
|
||||||
from llnl.util.filesystem import *
|
from llnl.util.filesystem import *
|
||||||
|
|
||||||
# This lives in $prefix/lib/spac/spack/__file__
|
# This lives in $prefix/lib/spack/spack/__file__
|
||||||
prefix = ancestor(__file__, 4)
|
prefix = ancestor(__file__, 4)
|
||||||
|
|
||||||
# The spack script itself
|
# The spack script itself
|
||||||
|
@ -47,8 +47,11 @@
|
|||||||
def all_hook_modules():
|
def all_hook_modules():
|
||||||
modules = []
|
modules = []
|
||||||
for name in list_modules(spack.hooks_path):
|
for name in list_modules(spack.hooks_path):
|
||||||
|
mod_name = __name__ + '.' + name
|
||||||
path = join_path(spack.hooks_path, name) + ".py"
|
path = join_path(spack.hooks_path, name) + ".py"
|
||||||
modules.append(imp.load_source('spack.hooks', path))
|
mod = imp.load_source(mod_name, path)
|
||||||
|
modules.append(mod)
|
||||||
|
|
||||||
return modules
|
return modules
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user