[ANN] pythonproducts 1.0beta1 released
I'm pleased to announce the first beta release of pythonproducts. pythonproducts ============== Description A mechanism to construct Zope 2 products as regular python packages. This enables a python package to be deployed as a Zope 2 product using a similar strategy as Zope 3. Author/Maintainer `Rocky Burt <rocky@serverzen.com>`__ Latest Release `1.0beta1 <http://dev.serverzen.com/site/projects/pythonproducts/releases/pythonproducts-1-0beta1-tar.gz/download>`__ License BSD-style, see LICENSE.txt for details Source Control http://codespeak.net/svn/z3/pythonproducts/ Requirements - Python 2.3.5 or higher in 2.3.x series - Zope 2.8 or 2.9 - Five 1.2 or higher Installing Uses regular python distutils for installation. Simply run:: python ./setup.py install --home /some/path/to/zope_instance_home Usage Once pythonproducts has been installed, the standard practise of installing a python package as a Zope 2 product is as follows: 1. edit (or create it if it doesn't exist already) ``$YOUR_PKG_SOURCE/configure.zcml`` and add the line ``<five:registerPackage package="." initialize=".initialize" />`` 2. copy your python package to ``$INSTANCE_HOME/lib/python`` 3. create a ZCML "slug" by creating the file `` $INSTANCE_HOME/etc/package-includes/yourpackage-configure.zcml`` and populating it with ``<configure package="yourpackage" />`` Explanation of Usage Step 1: Your python package needs to register itself as a Zope 2 product. This is accomplished by using the new ``registerPackage`` directive. This directive takes a (required) "package" attribute which declares any python package as a Zope 2 product (with "." meaning this package). Another (optional) attribute is the 'initialize' attribute. If this attribute is defined, a function with that name will be invoked in a traditional Zope 2 style with a ProductContext instance as the sole argument. Step 2: Your python package needs to exist *somewhere* on PYTHONPATH. With Zope 2.8, $INSTANCE_HOME/lib/python is added to the PYTHONPATH so copying your python package there ensures its somewhere in PYTHONPATH. But really your python package could be copied to any directory that exists on PYTHONPATH (ie /usr/lib/python2.3/site-packages). Step 3: The standard way of registering a package with Zope 3 is to create a ZCML "slug" in the $INSTANCE_HOME/etc/package-includes directory. This file can be called anything as long as it ends with "-configure.zcml". Regards, Rocky -- Rocky Burt AdaptiveWave - Content Management as a Service http://www.adaptivewave.com Content Management Made Simple
Cool. What's the status of it regarding integration directly into Zope 2.10? Florent Rocky Burt wrote:
I'm pleased to announce the first beta release of pythonproducts.
pythonproducts ==============
Description A mechanism to construct Zope 2 products as regular python packages. This enables a python package to be deployed as a Zope 2 product using a similar strategy as Zope 3.
Author/Maintainer `Rocky Burt <rocky@serverzen.com>`__
Latest Release `1.0beta1 <http://dev.serverzen.com/site/projects/pythonproducts/releases/pythonproducts-1-0beta1-tar.gz/download>`__
License BSD-style, see LICENSE.txt for details
Source Control http://codespeak.net/svn/z3/pythonproducts/
Requirements - Python 2.3.5 or higher in 2.3.x series - Zope 2.8 or 2.9 - Five 1.2 or higher
-- Florent Guillaume, Nuxeo (Paris, France) Director of R&D +33 1 40 33 71 59 http://nuxeo.com fg@nuxeo.com
On Sun, 2006-23-04 at 19:30 +0200, Florent Guillaume wrote:
Cool. What's the status of it regarding integration directly into Zope 2.10?
Well, pythonproducts patches regular Zope and also CMF. Five 1.4 includes the patches for regular Zope... and with Zope 2.10 those patches will of course be directly applied to Zope (thats what I'm working on right now). But there's still the matter of CMF. At some point I want to get the patches integrated into CMF 1.6 and/or 2.0 but with 1.6 its probably too late and with CMF 2.0 I need to better understand how the FTI stuff works before I can (or if I even should) apply the patches. This basically means with Zope 2.10, pythonproducts will be 75% useless ... everything besides the CMF stuff. - Rocky -- Rocky Burt AdaptiveWave - Content Management as a Service http://www.adaptivewave.com Content Management Made Simple
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 23 Apr 2006, at 18:47, Rocky Burt wrote:
On Sun, 2006-23-04 at 19:30 +0200, Florent Guillaume wrote:
Cool. What's the status of it regarding integration directly into Zope 2.10?
Well, pythonproducts patches regular Zope and also CMF. Five 1.4 includes the patches for regular Zope... and with Zope 2.10 those patches will of course be directly applied to Zope (thats what I'm working on right now).
But there's still the matter of CMF. At some point I want to get the patches integrated into CMF 1.6 and/or 2.0 but with 1.6 its probably too late and with CMF 2.0 I need to better understand how the FTI stuff works before I can (or if I even should) apply the patches.
Whatever those patches are (I did not look) you should target CMF 2.1 (the current trunk) and not 1.6/2.0 because those are now in maintenance mode. CMF 2.1 will be ready in time for Plone 3.0, that's already been decided. jens -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) iD8DBQFES8X8RAx5nvEhZLIRApq3AJ9kaPyCK4YDIguIOyewvaiKb3BPwACfV1W+ eKVNmri6zGeOIqZDPJq5ubE= =ZH5K -----END PGP SIGNATURE-----
On Sun, 2006-23-04 at 19:22 +0100, Jens Vagelpohl wrote:
But there's still the matter of CMF. At some point I want to get the patches integrated into CMF 1.6 and/or 2.0 but with 1.6 its probably too late and with CMF 2.0 I need to better understand how the FTI stuff works before I can (or if I even should) apply the patches.
Whatever those patches are (I did not look) you should target CMF 2.1 (the current trunk) and not 1.6/2.0 because those are now in maintenance mode. CMF 2.1 will be ready in time for Plone 3.0, that's already been decided.
Great news regarding CMF 2.1 and Plone. Specifically all pythonproducts does for CMF is patch CMFCore.TypesTool.TypesTool.listDefaultTypeInformation so that when it looks up a product it doesn't simply look it up from the Products package namespace, but it checks all registered product packages (can be found by scanning Control_Panel/Products). Maybe you could enlighten me on how much thats used now with CMF 2.0+. - Rocky -- Rocky Burt AdaptiveWave - Content Management as a Service http://www.adaptivewave.com Content Management Made Simple
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 23 Apr 2006, at 19:33, Rocky Burt wrote:
Great news regarding CMF 2.1 and Plone. Specifically all pythonproducts does for CMF is patch CMFCore.TypesTool.TypesTool.listDefaultTypeInformation so that when it looks up a product it doesn't simply look it up from the Products package namespace, but it checks all registered product packages (can be found by scanning Control_Panel/Products).
Maybe you could enlighten me on how much thats used now with CMF 2.0+.
That method no longer exists in CMF 2.0/trunk because FTIs are deprecated in favor of using GenericSetup profiles for defining content types. jens -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) iD8DBQFES8opRAx5nvEhZLIRApPrAKC1dLP1kscSIuX+19obQNef8mMfYACbBHSj TKcqvc5bN3mlFJhJB/aG56I= =cybm -----END PGP SIGNATURE-----
Hi Rocky! Rocky Burt wrote:
Well, pythonproducts patches regular Zope and also CMF. Five 1.4 includes the patches for regular Zope... and with Zope 2.10 those patches will of course be directly applied to Zope (thats what I'm working on right now).
But there's still the matter of CMF. At some point I want to get the patches integrated into CMF 1.6 and/or 2.0 but with 1.6 its probably too late and with CMF 2.0 I need to better understand how the FTI stuff works before I can (or if I even should) apply the patches.
This basically means with Zope 2.10, pythonproducts will be 75% useless ... everything besides the CMF stuff.
listDefaultTypeInformation no longer exists in CMF 2.0 and AFAICS that's the only thing pythonproducts patches in CMF. So I guess 1.) the CMF stuff is obsolete with CMF 2.0 2.) pythonproducts doesn't work with CMF 2.0 (not tested, but patch_listDefaultTypeInformation seems to require listDefaultTypeInformation) 3.) registerPackage works out of the box with Five 1.4 / Zope 2.10 (also not tested) Cheers, Yuppie
On Sun, 2006-23-04 at 20:40 +0200, yuppie wrote:
So I guess
1.) the CMF stuff is obsolete with CMF 2.0
Indeed, this is great news!
2.) pythonproducts doesn't work with CMF 2.0 (not tested, but patch_listDefaultTypeInformation seems to require listDefaultTypeInformation)
Right, a goal of beta2 is to make sure certain futuristic combinations of zope/five/cmf still at least run with pythonproducts even if pythonproducts isn't required. Main goal is to ensure pythonproducts is smart enough to only patch stuff that isn't already working.
3.) registerPackage works out of the box with Five 1.4 / Zope 2.10 (also not tested)
Well, a little more than that. registerPackage "should" work out of the box with the following combos: - Zope 2.9 and Five 1.4+ - Zope 2.10 (any Five version including the included version) - Rocky -- Rocky Burt AdaptiveWave - Content Management as a Service http://www.adaptivewave.com Content Management Made Simple
participants (4)
-
Florent Guillaume -
Jens Vagelpohl -
Rocky Burt -
yuppie