Use realpath in addition to expanduser to locate spack directory.
This commit is contained in:
parent
eb0832e379
commit
340fe565d4
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue