Use realpath in addition to expanduser to locate spack directory.

This commit is contained in:
Todd Gamblin 2013-05-15 16:47:50 -07:00
parent eb0832e379
commit 340fe565d4

View file

@ -5,7 +5,8 @@ import sys
import argparse import argparse
# Find spack's location and its prefix. # Find spack's location and its prefix.
SPACK_FILE = os.environ["SPACK_FILE"] = os.path.expanduser(__file__) SPACK_FILE = os.path.realpath(os.path.expanduser(__file__))
os.environ["SPACK_FILE"] = SPACK_FILE
SPACK_PREFIX = os.path.dirname(os.path.dirname(SPACK_FILE)) SPACK_PREFIX = os.path.dirname(os.path.dirname(SPACK_FILE))
# Allow spack libs to be imported in our scripts # Allow spack libs to be imported in our scripts