Skip to content
Snippets Groups Projects
Commit 5cd4ddaf authored by Todd Gamblin's avatar Todd Gamblin
Browse files

Fix for SPACK-49.

- name conflict in imp.load_source caused this to fail.
- Python modules loaded by imp have unique names now.
parent 08f1701e
No related branches found
No related tags found
No related merge requests found
......@@ -26,7 +26,7 @@
import tempfile
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)
# The spack script itself
......
......@@ -47,8 +47,11 @@
def all_hook_modules():
modules = []
for name in list_modules(spack.hooks_path):
mod_name = __name__ + '.' + name
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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment