[Zope3-checkins] SVN: Zope3/trunk/ - Declare the zope top-level package as a namespace package if

Sidnei da Silva sidnei at enfoldsystems.com
Wed Jan 25 13:00:25 EST 2006


Log message for revision 41442:
  
        - Declare the zope top-level package as a namespace package if
          pkg_resources is available. This will enable distribution of
          zope.* packages as individual eggs.
  

Changed:
  U   Zope3/trunk/doc/CHANGES.txt
  U   Zope3/trunk/src/zope/__init__.py

-=-
Modified: Zope3/trunk/doc/CHANGES.txt
===================================================================
--- Zope3/trunk/doc/CHANGES.txt	2006-01-25 17:48:23 UTC (rev 41441)
+++ Zope3/trunk/doc/CHANGES.txt	2006-01-25 18:00:25 UTC (rev 41442)
@@ -21,6 +21,10 @@
       - By default, persistent logs now contain the same extra
         traceback information that's visible through the web.
 
+      - Declare the "zope" top-level package as a namespace package if
+        "pkg_resources" is available. This will enable distribution of
+        "zope.*" packages as individual eggs.
+
     Restructuring
 
       - Removed unused menus and made previous titles, the description,

Modified: Zope3/trunk/src/zope/__init__.py
===================================================================
--- Zope3/trunk/src/zope/__init__.py	2006-01-25 17:48:23 UTC (rev 41441)
+++ Zope3/trunk/src/zope/__init__.py	2006-01-25 18:00:25 UTC (rev 41442)
@@ -13,3 +13,10 @@
 ##############################################################################
 #
 # This file is necessary to make this directory a package.
+
+try:
+    # Declare this a namespace package if pkg_resources is available.
+    import pkg_resources
+    pkg_resources.declare_namespace('zope')
+except ImportError:
+    pass



More information about the Zope3-Checkins mailing list