Commit 93ef2655 authored by Tres Seaver's avatar Tres Seaver

Collector #2358: backported fix making 'Products' package a real "namespace...

Collector #2358: backported fix making 'Products' package a real "namespace package" from the trunk.
parent a9e9b2a2
......@@ -8,6 +8,9 @@ Zope Changes
Bugs fixed
- Collector #2358: backported fix making 'Products' package a real
"namespace package" from the trunk.
- Collector #2287: form ':record' objects did not implement enough of
the mapping interface.
......
......@@ -634,9 +634,10 @@ def install_products(app):
folder_permissions, raise_exc=debug_mode)
# Delayed install of packages-as-products
for module, init_func in Products._packages_to_initialize:
for module, init_func in getattr(Products, '_packages_to_initialize', []):
install_package(app, module, init_func, raise_exc=debug_mode)
Products._packages_to_initialize = []
if hasattr(Products, '_packages_to_initialize'):
del Products._packages_to_initialize
Products.meta_types=Products.meta_types+tuple(meta_types)
InitializeClass(Folder.Folder)
......
......@@ -12,7 +12,9 @@
##############################################################################
__ac_permissions__=()
# This is used to keep track of packages which need to be initialized as
# products. These will be processed during the usual product installation
# in OFS.Application
_packages_to_initialize = []
\ No newline at end of file
# 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__)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment