[Checkins] SVN: z3ext.product/tags/1.0.2/ egg 1.0.2
Nikolay Kim
fafhrd at datacom.kz
Mon May 26 02:53:34 EDT 2008
Log message for revision 86957:
egg 1.0.2
Changed:
A z3ext.product/tags/1.0.2/
D z3ext.product/tags/1.0.2/CHANGES.txt
A z3ext.product/tags/1.0.2/CHANGES.txt
D z3ext.product/tags/1.0.2/setup.py
A z3ext.product/tags/1.0.2/setup.py
D z3ext.product/tags/1.0.2/src/z3ext/product/product.py
A z3ext.product/tags/1.0.2/src/z3ext/product/product.py
-=-
Copied: z3ext.product/tags/1.0.2 (from rev 86901, z3ext.product/trunk)
Deleted: z3ext.product/tags/1.0.2/CHANGES.txt
===================================================================
--- z3ext.product/trunk/CHANGES.txt 2008-05-21 22:49:29 UTC (rev 86901)
+++ z3ext.product/tags/1.0.2/CHANGES.txt 2008-05-26 06:53:34 UTC (rev 86957)
@@ -1,53 +0,0 @@
-=======
-CHANGES
-=======
-
-1.0.1 (2008-05-15)
-------------------
-
-- Compatibility with z3ext.controlpanel >= 1.2.3
-
-
-1.0.0 (2008-03-26)
-------------------
-
-- Tests added
-
-- Code moved to svn.zope.org
-
-
-0.11.1 (2008-03-04)
--------------------
-
-- Added 'broken' base registry in case product not available.
-
-
-0.11 (2008-02-28)
------------------
-
-- Use z3c.baseregistry
-
-- Use z3c.autoinclude
-
-- Create components registry for each product.
- now it's possible to use <registerIn registry="z3ext.product.productName'/>
- for registering product adapters and utulities.
-
-
-0.10.2 (2008-02-18)
-------------------
-
-- Don't show 'Products Management' configlet
- if there are no installable products
-
-
-0.10.1 (2008-02-01)
-------------------
-
-- Removed `grant` directives
-
-
-0.10 (2008-02-01)
-------------------
-
-- Initial release
Copied: z3ext.product/tags/1.0.2/CHANGES.txt (from rev 86956, z3ext.product/trunk/CHANGES.txt)
===================================================================
--- z3ext.product/tags/1.0.2/CHANGES.txt (rev 0)
+++ z3ext.product/tags/1.0.2/CHANGES.txt 2008-05-26 06:53:34 UTC (rev 86957)
@@ -0,0 +1,59 @@
+=======
+CHANGES
+=======
+
+1.0.2 (2008-05-26)
+------------------
+
+- During product instalation, first install CA registry, then call update
+
+
+1.0.1 (2008-05-15)
+------------------
+
+- Compatibility with z3ext.controlpanel >= 1.2.3
+
+
+1.0.0 (2008-03-26)
+------------------
+
+- Tests added
+
+- Code moved to svn.zope.org
+
+
+0.11.1 (2008-03-04)
+-------------------
+
+- Added 'broken' base registry in case product not available.
+
+
+0.11 (2008-02-28)
+-----------------
+
+- Use z3c.baseregistry
+
+- Use z3c.autoinclude
+
+- Create components registry for each product.
+ now it's possible to use <registerIn registry="z3ext.product.productName'/>
+ for registering product adapters and utulities.
+
+
+0.10.2 (2008-02-18)
+------------------
+
+- Don't show 'Products Management' configlet
+ if there are no installable products
+
+
+0.10.1 (2008-02-01)
+------------------
+
+- Removed `grant` directives
+
+
+0.10 (2008-02-01)
+------------------
+
+- Initial release
Deleted: z3ext.product/tags/1.0.2/setup.py
===================================================================
--- z3ext.product/trunk/setup.py 2008-05-21 22:49:29 UTC (rev 86901)
+++ z3ext.product/tags/1.0.2/setup.py 2008-05-26 06:53:34 UTC (rev 86957)
@@ -1,77 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2008 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-"""Setup for z3ext.product package
-
-$Id: setup.py 1842 2008-03-25 16:41:22Z fafhrd91 $
-"""
-import sys, os
-from setuptools import setup, find_packages
-
-def read(*rnames):
- return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
-
-version = '1.0.1dev'
-
-
-setup(name='z3ext.product',
- version=version,
- description="Implementation of product (add-on) concept.",
- long_description=(
- 'Detailed Documentation\n' +
- '======================\n'
- + '\n\n' +
- read('src', 'z3ext', 'product', 'README.txt')
- + '\n\n' +
- read('CHANGES.txt')
- ),
- classifiers=[
- 'Development Status :: 5 - Production/Stable',
- 'Environment :: Web Environment',
- 'Intended Audience :: Developers',
- 'License :: OSI Approved :: Zope Public License',
- 'Programming Language :: Python',
- 'Natural Language :: English',
- 'Operating System :: OS Independent',
- 'Topic :: Internet :: WWW/HTTP',
- 'Framework :: Zope3'],
- author='Nikolay Kim',
- author_email='fafhrd91 at gmail.com',
- url='http://z3ext.net/',
- license='ZPL 2.1',
- packages=find_packages('src'),
- package_dir = {'':'src'},
- namespace_packages=['z3ext'],
- install_requires = ['setuptools',
- 'ZODB3',
- 'zope.schema',
- 'zope.component',
- 'zope.interface',
- 'zope.security',
- 'zope.i18nmessageid',
- 'zope.lifecycleevent',
- 'zope.configuration',
- 'zope.app.component',
- 'z3c.baseregistry',
- 'z3c.configurator',
- 'z3c.autoinclude',
- 'z3ext.layout',
- 'z3ext.controlpanel',
- 'z3ext.statusmessage',
- ],
- extras_require = dict(test=['zope.app.testing',
- 'zope.testing',
- ]),
- include_package_data = True,
- zip_safe = False
- )
Copied: z3ext.product/tags/1.0.2/setup.py (from rev 86956, z3ext.product/trunk/setup.py)
===================================================================
--- z3ext.product/tags/1.0.2/setup.py (rev 0)
+++ z3ext.product/tags/1.0.2/setup.py 2008-05-26 06:53:34 UTC (rev 86957)
@@ -0,0 +1,77 @@
+##############################################################################
+#
+# Copyright (c) 2008 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Setup for z3ext.product package
+
+$Id: setup.py 1842 2008-03-25 16:41:22Z fafhrd91 $
+"""
+import sys, os
+from setuptools import setup, find_packages
+
+def read(*rnames):
+ return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
+
+version = '1.0.2'
+
+
+setup(name='z3ext.product',
+ version=version,
+ description="Implementation of product (add-on) concept.",
+ long_description=(
+ 'Detailed Documentation\n' +
+ '======================\n'
+ + '\n\n' +
+ read('src', 'z3ext', 'product', 'README.txt')
+ + '\n\n' +
+ read('CHANGES.txt')
+ ),
+ classifiers=[
+ 'Development Status :: 5 - Production/Stable',
+ 'Environment :: Web Environment',
+ 'Intended Audience :: Developers',
+ 'License :: OSI Approved :: Zope Public License',
+ 'Programming Language :: Python',
+ 'Natural Language :: English',
+ 'Operating System :: OS Independent',
+ 'Topic :: Internet :: WWW/HTTP',
+ 'Framework :: Zope3'],
+ author='Nikolay Kim',
+ author_email='fafhrd91 at gmail.com',
+ url='http://z3ext.net/',
+ license='ZPL 2.1',
+ packages=find_packages('src'),
+ package_dir = {'':'src'},
+ namespace_packages=['z3ext'],
+ install_requires = ['setuptools',
+ 'ZODB3',
+ 'zope.schema',
+ 'zope.component',
+ 'zope.interface',
+ 'zope.security',
+ 'zope.i18nmessageid',
+ 'zope.lifecycleevent',
+ 'zope.configuration',
+ 'zope.app.component',
+ 'z3c.baseregistry',
+ 'z3c.configurator',
+ 'z3c.autoinclude',
+ 'z3ext.layout',
+ 'z3ext.controlpanel',
+ 'z3ext.statusmessage',
+ ],
+ extras_require = dict(test=['zope.app.testing',
+ 'zope.testing',
+ ]),
+ include_package_data = True,
+ zip_safe = False
+ )
Deleted: z3ext.product/tags/1.0.2/src/z3ext/product/product.py
===================================================================
--- z3ext.product/trunk/src/z3ext/product/product.py 2008-05-21 22:49:29 UTC (rev 86901)
+++ z3ext.product/tags/1.0.2/src/z3ext/product/product.py 2008-05-26 06:53:34 UTC (rev 86957)
@@ -1,124 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2007 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-"""
-
-$Id: product.py 1843 2008-03-25 18:39:00Z fafhrd91 $
-"""
-from BTrees.OOBTree import OOBTree
-
-from zope import interface, event
-from zope.component import getSiteManager
-from zope.component import getUtility, queryUtility, getUtilitiesFor
-
-from z3c.configurator import configure
-
-import z3ext.product
-from z3ext.controlpanel.configlettype import ConfigletProperty
-
-from z3ext.product.i18n import _
-from z3ext.product import interfaces
-from z3ext.product.interfaces import IProduct, IProductExtension
-
-
-class Product(object):
- """ base product class """
- interface.implements(IProduct)
-
- __installed__ = ConfigletProperty(IProduct['__installed__'])
-
- def install(self):
- if self.__installed__:
- raise interfaces.ProductAlreadyInstalledError(
- _('Product already installed.'))
-
- self.__installed__ = True
- self.update()
-
- sm = getSiteManager()
-
- registry = getattr(z3ext.product, self.__product_name__)
- if registry not in sm.__bases__:
- sm.__bases__ = (registry,) + sm.__bases__
-
- event.notify(interfaces.ProductInstalledEvent(self.__product_name__, self))
-
- def update(self):
- if not self.__installed__:
- raise interfaces.ProductNotInstalledError(
- _('Product not installed.'))
-
- configure(self, {})
-
- site = getSiteManager()
- registry = getattr(z3ext.product, self.__product_name__)
- if registry not in site.__bases__:
- site.__bases__ = (registry,) + site.__bases__
-
- event.notify(interfaces.ProductUpdatedEvent(
- self.__product_name__, self))
-
- def uninstall(self):
- for name, ext in self.items():
- if IProductExtension.providedBy(ext) and ext.__installed__:
- ext.uninstall()
-
- if not self.__installed__:
- raise interfaces.ProductNotInstalledError(
- _('Product not installed.'))
-
- self.__installed__ = False
-
- site = getSiteManager()
- registry = getattr(z3ext.product, self.__product_name__)
-
- if registry in site.__bases__:
- bases = list(site.__bases__)
- bases.remove(registry)
- site.__bases__ = tuple(bases)
-
- event.notify(interfaces.ProductUninstalledEvent(
- self.__product_name__, self))
-
- def isInstalled(self):
- return self.__installed__
-
- def listExtensions(self):
- exts = []
- for name, ext in self.items():
- if IProductExtension.providedBy(ext):
- exts.append(name)
-
- return exts
-
-
-class ProductExtension(Product):
- interface.implements(IProductExtension)
-
- def install(self):
- if not self.__parent__.__installed__:
- raise interfaces.ProductNotInstalledError(
- self.__parent__.__product_name__)
- super(ProductExtension, self).install()
-
- def update(self):
- if not self.__parent__.__installed__:
- raise interfaces.ProductNotInstalledError(
- self.__parent__.__product_name__)
- super(ProductExtension, self).update()
-
- def isInstalled(self):
- if self.__parent__.__installed__:
- return self.__installed__
- else:
- return False
Copied: z3ext.product/tags/1.0.2/src/z3ext/product/product.py (from rev 86956, z3ext.product/trunk/src/z3ext/product/product.py)
===================================================================
--- z3ext.product/tags/1.0.2/src/z3ext/product/product.py (rev 0)
+++ z3ext.product/tags/1.0.2/src/z3ext/product/product.py 2008-05-26 06:53:34 UTC (rev 86957)
@@ -0,0 +1,125 @@
+##############################################################################
+#
+# Copyright (c) 2007 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""
+
+$Id: product.py 1843 2008-03-25 18:39:00Z fafhrd91 $
+"""
+from BTrees.OOBTree import OOBTree
+
+from zope import interface, event
+from zope.component import getSiteManager
+from zope.component import getUtility, queryUtility, getUtilitiesFor
+
+from z3c.configurator import configure
+
+import z3ext.product
+from z3ext.controlpanel.configlettype import ConfigletProperty
+
+from z3ext.product.i18n import _
+from z3ext.product import interfaces
+from z3ext.product.interfaces import IProduct, IProductExtension
+
+
+class Product(object):
+ """ base product class """
+ interface.implements(IProduct)
+
+ __installed__ = ConfigletProperty(IProduct['__installed__'])
+
+ def install(self):
+ if self.__installed__:
+ raise interfaces.ProductAlreadyInstalledError(
+ _('Product already installed.'))
+
+ self.__installed__ = True
+
+ sm = getSiteManager()
+
+ registry = getattr(z3ext.product, self.__product_name__)
+ if registry not in sm.__bases__:
+ sm.__bases__ = (registry,) + sm.__bases__
+
+ event.notify(interfaces.ProductInstalledEvent(self.__product_name__, self))
+
+ self.update()
+
+ def update(self):
+ if not self.__installed__:
+ raise interfaces.ProductNotInstalledError(
+ _('Product not installed.'))
+
+ configure(self, {})
+
+ site = getSiteManager()
+ registry = getattr(z3ext.product, self.__product_name__)
+ if registry not in site.__bases__:
+ site.__bases__ = (registry,) + site.__bases__
+
+ event.notify(interfaces.ProductUpdatedEvent(
+ self.__product_name__, self))
+
+ def uninstall(self):
+ for name, ext in self.items():
+ if IProductExtension.providedBy(ext) and ext.__installed__:
+ ext.uninstall()
+
+ if not self.__installed__:
+ raise interfaces.ProductNotInstalledError(
+ _('Product not installed.'))
+
+ self.__installed__ = False
+
+ site = getSiteManager()
+ registry = getattr(z3ext.product, self.__product_name__)
+
+ if registry in site.__bases__:
+ bases = list(site.__bases__)
+ bases.remove(registry)
+ site.__bases__ = tuple(bases)
+
+ event.notify(interfaces.ProductUninstalledEvent(
+ self.__product_name__, self))
+
+ def isInstalled(self):
+ return self.__installed__
+
+ def listExtensions(self):
+ exts = []
+ for name, ext in self.items():
+ if IProductExtension.providedBy(ext):
+ exts.append(name)
+
+ return exts
+
+
+class ProductExtension(Product):
+ interface.implements(IProductExtension)
+
+ def install(self):
+ if not self.__parent__.__installed__:
+ raise interfaces.ProductNotInstalledError(
+ self.__parent__.__product_name__)
+ super(ProductExtension, self).install()
+
+ def update(self):
+ if not self.__parent__.__installed__:
+ raise interfaces.ProductNotInstalledError(
+ self.__parent__.__product_name__)
+ super(ProductExtension, self).update()
+
+ def isInstalled(self):
+ if self.__parent__.__installed__:
+ return self.__installed__
+ else:
+ return False
More information about the Checkins
mailing list