hack to make bins work without PYTHONPATH

This commit is contained in:
Bryce Allen
2015-03-20 22:23:02 -05:00
parent 2abdeaa5b7
commit 45c0cfd10c
5 changed files with 19 additions and 0 deletions

11
bin/_pathfix.py Normal file
View File

@@ -0,0 +1,11 @@
"""
Hack to get scripts to run from source checkout without having to set
PYTHONPATH.
"""
import sys
from os.path import dirname, join, abspath
bin_path = dirname(__file__)
project_path = abspath(join(bin_path, ".."))
sys.path.insert(0, project_path)