summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/package.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py
index 9af3221837..c17bec4a14 100644
--- a/lib/spack/spack/package.py
+++ b/lib/spack/spack/package.py
@@ -926,6 +926,9 @@ class Package(object):
install(env_path, env_install_path)
dump_packages(self.spec, packages_dir)
+ # Run post install hooks before build stage is removed.
+ spack.hooks.post_install(self)
+
# Stop timer.
self._total_time = time.time() - start_time
build_time = self._total_time - self._fetch_time
@@ -954,9 +957,6 @@ class Package(object):
# the database, so that we don't need to re-read from file.
spack.installed_db.add(self.spec, self.prefix)
- # Once everything else is done, run post install hooks
- spack.hooks.post_install(self)
-
def sanity_check_prefix(self):
"""This function checks whether install succeeded."""