hack to make bins work without PYTHONPATH

main
Bryce Allen 11 years ago
parent 2abdeaa5b7
commit 45c0cfd10c

@ -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)

@ -1,5 +1,7 @@
#!/usr/bin/env python
# Set PYTHONPATH in lighttpd or other server config.
from flup.server.fcgi import WSGIServer
from mhapi.web.wsgi import application

@ -47,6 +47,8 @@ For great luck, replace 69 with 90
import sys
import _pathfix
from mhapi import stats
if __name__ == '__main__':

@ -2,6 +2,8 @@
import codecs
import _pathfix
from mhapi.db import MHDB
from mhapi import rewards

@ -1,5 +1,7 @@
#!/usr/bin/env python
import _pathfix
from mhapi.web.wsgi import application
LISTEN_HOST = ""

Loading…
Cancel
Save