Deleted:
/project/app/set_sys_path.py
Modified:
/project/app/main.py
=======================================
--- /project/app/set_sys_path.py Sun Apr 24 05:22:59 2011
+++ /dev/null
@@ -1,24 +0,0 @@
-# -*- coding: utf-8 -*-
-"""Sets sys.path for the library directories.
-
-The purpose of this file is to have a single place to define extra paths.
-This is convenient in case many entry points are used instead of a single
-main.py.
-"""
-import os
-import sys
-
-current_path = os.path.abspath(os.path.dirname(__file__))
-lib_path = os.path.join(current_path, 'lib')
-
-def set_path():
- # Add lib as primary libraries directory, with fallback to lib/dist
- # and optionally to lib/dist.zip, loaded using zipimport.
- if lib_path not in sys.path:
- sys.path[0:0] = [
- lib_path,
- os.path.join(lib_path, 'dist'),
- os.path.join(lib_path, 'dist.zip'),
- ]
-
-set_path()
=======================================
--- /project/app/main.py Sun Apr 24 05:22:59 2011
+++ /project/app/main.py Tue May 10 07:06:50 2011
@@ -1,8 +1,18 @@
# -*- coding: utf-8 -*-
"""WSGI app setup."""
import os
-
-import set_sys_path
+import sys
+
+# Add lib as primary libraries directory, with fallback to lib/dist
+# and optionally to lib/dist.zip, loaded using zipimport.
+lib_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'lib')
+if lib_path not in sys.path:
+ sys.path[0:0] = [
+ lib_path,
+ os.path.join(lib_path, 'dist'),
+ os.path.join(lib_path, 'dist.zip'),
+ ]
+
from tipfy.app import App
from config import config
@@ -30,7 +40,6 @@
enable_jinja2_debugging()
def main():
- set_sys_path.set_path()
app.run()
if __name__ == '__main__':