[Zope-Checkins] SVN: Zope/trunk/ All Products folders as well as
	the zope and zope.app folders are declared as setuptools
	namespace packages now. This allows products to be shipped
	and included as standard eggs without loosing any of their
	special Zope2 treatment. See
	http://mail.zope.org/pipermail/zope-dev/2007-April/029257.html
	for discussion.
    Hanno Schlichting 
    plone at hannosch.info
       
    Sat Aug 25 10:38:29 EDT 2007
    
    
  
Log message for revision 79263:
  All Products folders as well as the zope and zope.app folders are declared as setuptools namespace packages now. This allows products to be shipped and included as standard eggs without loosing any of their special Zope2 treatment. See http://mail.zope.org/pipermail/zope-dev/2007-April/029257.html for discussion.
  
Changed:
  U   Zope/trunk/doc/CHANGES.txt
  U   Zope/trunk/lib/python/Products/__init__.py
  U   Zope/trunk/lib/python/zope/__init__.py
  U   Zope/trunk/lib/python/zope/app/__init__.py
  U   Zope/trunk/skel/Products/README.txt
  A   Zope/trunk/skel/Products/__init__.py
-=-
Modified: Zope/trunk/doc/CHANGES.txt
===================================================================
--- Zope/trunk/doc/CHANGES.txt	2007-08-25 14:24:03 UTC (rev 79262)
+++ Zope/trunk/doc/CHANGES.txt	2007-08-25 14:38:28 UTC (rev 79263)
@@ -9,6 +9,11 @@
 
     Restructuring
 
+      - All Products folders as well as the zope and zope.app folders are
+        declared as setuptools namespace packages now. See
+        http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
+        for more information about namespace packages.
+
       - ZPT: removed display of ZPT warnings since warnings were
         removed from the zope.pagetemplate implementation     
 
Modified: Zope/trunk/lib/python/Products/__init__.py
===================================================================
--- Zope/trunk/lib/python/Products/__init__.py	2007-08-25 14:24:03 UTC (rev 79262)
+++ Zope/trunk/lib/python/Products/__init__.py	2007-08-25 14:38:28 UTC (rev 79263)
@@ -11,3 +11,10 @@
 #
 ##############################################################################
 __ac_permissions__=()
+
+# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
+try:
+    __import__('pkg_resources').declare_namespace(__name__)
+except ImportError:
+    from pkgutil import extend_path
+    __path__ = extend_path(__path__, __name__)
Modified: Zope/trunk/lib/python/zope/__init__.py
===================================================================
--- Zope/trunk/lib/python/zope/__init__.py	2007-08-25 14:24:03 UTC (rev 79262)
+++ Zope/trunk/lib/python/zope/__init__.py	2007-08-25 14:38:28 UTC (rev 79263)
@@ -13,10 +13,16 @@
 ##############################################################################
 """Zope Container Package
 
-This package uses pkgutil so that the package can be split over
+This package uses setuptools / pkgutil so that the package can be split over
 multiple directories.
 
+See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
+
 $Id$
 """
-from pkgutil import extend_path
-__path__ = extend_path(__path__, __name__)
+
+try:
+    __import__('pkg_resources').declare_namespace(__name__)
+except ImportError:
+    from pkgutil import extend_path
+    __path__ = extend_path(__path__, __name__)
Modified: Zope/trunk/lib/python/zope/app/__init__.py
===================================================================
--- Zope/trunk/lib/python/zope/app/__init__.py	2007-08-25 14:24:03 UTC (rev 79262)
+++ Zope/trunk/lib/python/zope/app/__init__.py	2007-08-25 14:38:28 UTC (rev 79263)
@@ -13,6 +13,16 @@
 ##############################################################################
 """Zope application package.
 
+This package uses setuptools / pkgutil so that the package can be split over
+multiple directories.
+
+See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
+
 $Id$
 """
 
+try:
+    __import__('pkg_resources').declare_namespace(__name__)
+except ImportError:
+    from pkgutil import extend_path
+    __path__ = extend_path(__path__, __name__)
Modified: Zope/trunk/skel/Products/README.txt
===================================================================
--- Zope/trunk/skel/Products/README.txt	2007-08-25 14:24:03 UTC (rev 79262)
+++ Zope/trunk/skel/Products/README.txt	2007-08-25 14:38:28 UTC (rev 79263)
@@ -1,3 +1,3 @@
 Additional products for your Zope instance should be installed in this
 directory.  A freshly created instance should only contain this
-README.txt file in this directory.
+README.txt file and an __init__.py in this directory.
Added: Zope/trunk/skel/Products/__init__.py
===================================================================
--- Zope/trunk/skel/Products/__init__.py	                        (rev 0)
+++ Zope/trunk/skel/Products/__init__.py	2007-08-25 14:38:28 UTC (rev 79263)
@@ -0,0 +1,6 @@
+# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
+try:
+    __import__('pkg_resources').declare_namespace(__name__)
+except ImportError:
+    from pkgutil import extend_path
+    __path__ = extend_path(__path__, __name__)
Property changes on: Zope/trunk/skel/Products/__init__.py
___________________________________________________________________
Name: svn:eol-style
   + native
    
    
More information about the Zope-Checkins
mailing list