Skip to content
Snippets Groups Projects
Commit 95c20ff7 authored by Lauri Himanen's avatar Lauri Himanen
Browse files

Fixed nomadcore and parser imports in setup_paths.py.

parent cd74ceef
Branches
Tags
No related merge requests found
import sys, os, os.path
"""
Setups the python-common library in the PYTHONPATH system variable.
"""
import sys
import os
import os.path
baseDir = os.path.dirname(os.path.abspath(__file__))
commonDir = os.path.normpath(os.path.join(baseDir,"../../../../python-common/common/python"))
commonDir = os.path.normpath(os.path.join(baseDir, "../../../../../python-common/common/python"))
parserDir = os.path.normpath(os.path.join(baseDir, "../../parser-vasp"))
if not commonDir in sys.path:
sys.path.insert(0, commonDir)
# Using sys.path.insert(1, ...) instead of sys.path.insert(0, ...) based on
# this discusssion:
# http://stackoverflow.com/questions/10095037/why-use-sys-path-appendpath-instead-of-sys-path-insert1-path
if commonDir not in sys.path:
sys.path.insert(1, commonDir)
if parserDir not in sys.path:
sys.path.insert(1, parserDir)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment