mirror of
https://github.com/Tygs/0bin.git
synced 2023-08-10 21:13:00 +03:00
26 lines
581 B
Python
26 lines
581 B
Python
# -*- coding: utf-8 -*-
|
|
|
|
"""
|
|
General configuration and imports gathering.
|
|
"""
|
|
|
|
import os
|
|
import sys
|
|
|
|
import settings
|
|
from paste import Paste
|
|
|
|
|
|
def setup_path():
|
|
"""
|
|
Add the project dir in the python path to the site to run with the
|
|
source code beeing just copied/pasted and not installed.
|
|
|
|
Also try to import dependancies. If it fails, fallback on embeded libs.
|
|
"""
|
|
sys.path.insert(0, os.path.dirname(settings.ROOT_DIR))
|
|
|
|
try:
|
|
import bottle
|
|
except ImportError:
|
|
sys.path.append(os.path.join(settings.ROOT_DIR, 'libs')) |