[Checkins] SVN: z3c.recipe.dev/branches/icemac-unix/src/z3c/ easier namespace package boilerplate code as described in http://docs.zope.org/zopetoolkit/steeringgroup/decisions.html
Michael Howitz
mh at gocept.com
Thu Aug 12 02:19:20 EDT 2010
Log message for revision 115644:
easier namespace package boilerplate code as described in http://docs.zope.org/zopetoolkit/steeringgroup/decisions.html
Changed:
U z3c.recipe.dev/branches/icemac-unix/src/z3c/__init__.py
U z3c.recipe.dev/branches/icemac-unix/src/z3c/recipe/__init__.py
-=-
Modified: z3c.recipe.dev/branches/icemac-unix/src/z3c/__init__.py
===================================================================
--- z3c.recipe.dev/branches/icemac-unix/src/z3c/__init__.py 2010-08-12 06:18:15 UTC (rev 115643)
+++ z3c.recipe.dev/branches/icemac-unix/src/z3c/__init__.py 2010-08-12 06:19:20 UTC (rev 115644)
@@ -1,7 +1 @@
-# this is a namespace package
-try:
- import pkg_resources
- pkg_resources.declare_namespace(__name__)
-except ImportError:
- import pkgutil
- __path__ = pkgutil.extend_path(__path__, __name__)
+__import__('pkg_resources').declare_namespace(__name__)
Modified: z3c.recipe.dev/branches/icemac-unix/src/z3c/recipe/__init__.py
===================================================================
--- z3c.recipe.dev/branches/icemac-unix/src/z3c/recipe/__init__.py 2010-08-12 06:18:15 UTC (rev 115643)
+++ z3c.recipe.dev/branches/icemac-unix/src/z3c/recipe/__init__.py 2010-08-12 06:19:20 UTC (rev 115644)
@@ -1,6 +1 @@
-# namespace package boilerplate
-try:
- __import__('pkg_resources').declare_namespace(__name__)
-except ImportError, e:
- from pkgutil import extend_path
- __path__ = extend_path(__path__, __name__)
+__import__('pkg_resources').declare_namespace(__name__)
More information about the checkins
mailing list