Skip to content
This repository has been archived by the owner on Oct 2, 2021. It is now read-only.

Commit

Permalink
Various changes to make imports work
Browse files Browse the repository at this point in the history
  • Loading branch information
bdarnell committed Feb 23, 2011
1 parent 1ff5677 commit 879391b
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
Empty file added chat/__init__.py
Empty file.
21 changes: 21 additions & 0 deletions sitecustomize.py
@@ -0,0 +1,21 @@
import os
import site
import sys

base_dir = os.path.dirname(os.path.abspath(__file__))

prev_sys_path = list(sys.path)

# site.addsitedir adds this directory to sys.path then scans for .pth files
# and adds them to the path too.
site.addsitedir(os.path.join(base_dir, 'third_party'))

# addsitedir adds its directories at the end, but we want our local stuff
# to take precedence over system-installed packages.
# See http://code.google.com/p/modwsgi/issues/detail?id=112
new_sys_path = []
for item in list(sys.path):
if item not in prev_sys_path:
new_sys_path.append(item)
sys.path.remove(item)
sys.path[:0] = new_sys_path
1 change: 1 addition & 0 deletions third_party/tornado.pth
@@ -0,0 +1 @@
tornado

0 comments on commit 879391b

Please sign in to comment.