Skip to content
Snippets Groups Projects
Commit cae1c187 authored by L. David Baron's avatar L. David Baron
Browse files

setup/hg: handle hg being a symlink when appending relative libdir to sys.path

Resolve symbolic links in the path to hg so that an hg that works when
invoked directly will also work when invoked via a symlink to it.
parent e0e8b123
No related branches found
No related tags found
No related merge requests found
......@@ -14,7 +14,8 @@
if libdir != '@' 'LIBDIR' '@':
if not os.path.isabs(libdir):
libdir = os.path.join(os.path.dirname(__file__), libdir)
libdir = os.path.join(os.path.dirname(os.path.realpath(__file__)),
libdir)
libdir = os.path.abspath(libdir)
sys.path.insert(0, libdir)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment