[Checkins] SVN: CMF/branches/jens_tools_as_utilities/CMFCore/ Added src/ as a PYTHONPATH directory if five.localsitemanager cannot be imported.

Rocky Burt rocky at serverzen.com
Thu Feb 22 18:09:06 EST 2007


Log message for revision 72772:
  Added src/ as a PYTHONPATH directory if five.localsitemanager cannot be imported.

Changed:
  U   CMF/branches/jens_tools_as_utilities/CMFCore/__init__.py
  A   CMF/branches/jens_tools_as_utilities/CMFCore/src/
  A   CMF/branches/jens_tools_as_utilities/CMFCore/src/five/
  A   CMF/branches/jens_tools_as_utilities/CMFCore/src/five/EXTERNALS.txt
  A   CMF/branches/jens_tools_as_utilities/CMFCore/src/five/__init__.py

-=-
Modified: CMF/branches/jens_tools_as_utilities/CMFCore/__init__.py
===================================================================
--- CMF/branches/jens_tools_as_utilities/CMFCore/__init__.py	2007-02-22 23:06:51 UTC (rev 72771)
+++ CMF/branches/jens_tools_as_utilities/CMFCore/__init__.py	2007-02-22 23:09:05 UTC (rev 72772)
@@ -69,6 +69,13 @@
                      )
 
 def initialize(context):
+    try:
+        import five.localsitemanager
+    except ImportError, e:
+        import sys
+        import os
+        sys.path.append(os.path.join(os.path.dirname(__file__), 'src'))
+        import five.localsitemanager
 
     context.registerClass(
         DirectoryView.DirectoryView,


Property changes on: CMF/branches/jens_tools_as_utilities/CMFCore/src/five
___________________________________________________________________
Name: svn:externals
   + #
# Used for maintenance of external resources in this svn bundle.  Edit
# this file as appropriate and then run the following command from within
# the checkout directory where this file lives on your local machine:
#
# svn propset svn:externals -F ./EXTERNALS.txt .
#
localsitemanager svn://svn.zope.org/repos/main/five.localsitemanager/tags/release-1.0/src/five/localsitemanager


Added: CMF/branches/jens_tools_as_utilities/CMFCore/src/five/EXTERNALS.txt
===================================================================
--- CMF/branches/jens_tools_as_utilities/CMFCore/src/five/EXTERNALS.txt	2007-02-22 23:06:51 UTC (rev 72771)
+++ CMF/branches/jens_tools_as_utilities/CMFCore/src/five/EXTERNALS.txt	2007-02-22 23:09:05 UTC (rev 72772)
@@ -0,0 +1,8 @@
+#
+# Used for maintenance of external resources in this svn bundle.  Edit
+# this file as appropriate and then run the following command from within
+# the checkout directory where this file lives on your local machine:
+#
+# svn propset svn:externals -F ./EXTERNALS.txt .
+#
+localsitemanager svn://svn.zope.org/repos/main/five.localsitemanager/tags/release-1.0/src/five/localsitemanager

Added: CMF/branches/jens_tools_as_utilities/CMFCore/src/five/__init__.py
===================================================================
--- CMF/branches/jens_tools_as_utilities/CMFCore/src/five/__init__.py	2007-02-22 23:06:51 UTC (rev 72771)
+++ CMF/branches/jens_tools_as_utilities/CMFCore/src/five/__init__.py	2007-02-22 23:09:05 UTC (rev 72772)
@@ -0,0 +1,7 @@
+# namespace package boilerplate
+try:
+    __import__('pkg_resources').declare_namespace(__name__)
+except ImportError, e:
+    from pkgutil import extend_path
+    __path__ = extend_path(__path__, __name__)
+



More information about the Checkins mailing list