-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

This is an old posting. It turned out that the quick installer
is swallowing exceptions e.g. ImportErrors caused by the Install.py
import in same case (instead of reporting them at least).

- -aj

Gilles Lenfant wrote:
> Le 10 mai 2011 à 07:45, ajung a écrit :
> 
>> As part of a current migration project we have a *lot* of Plone
>> 2.5 AT-based Products to be ported to Plone 4. Some of them only
>> contain an Install.py and there is too much code in order to rewrite
>> the code using GenericSetup. Is there a way to call the old Install.py
>> magic with Plone 4? Maurits pointed me to five:registerPackage but it
>> does not seem to help me - eggified Products having
>> Extensions/Install.py but no registered profile just don't show up
>> in the quick installer.
> 
> Just register an (almost) empty GS profile and use an import step that calls 
> your external method.
> This is somehow dirty but this works.
> 
> put a "profiles/default/my_product.txt" marker file
> 
> === setuphandler.py ====
> from zope.site.hooks import getSite
> from Products.MyProducts.Extensions.Install import install
> 
> def my_import_step(setuptool):
>     if setuptool.readDataFile('my_product.txt') is None:
>         return
>     portal = getSite()
>     install(portal)
>     return
> === /setuphandler.py ====
> 
> HTH


- -- 
ZOPYX Limited           | zopyx group
Charlottenstr. 37/1     | The full-service network for Zope & Plone
D-72070 Tübingen        | Produce & Publish
www.zopyx.com           | www.produce-and-publish.com
- ------------------------------------------------------------------------
E-Publishing, Python, Zope & Plone development, Consulting


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQGUBAEBAgAGBQJN25p4AAoJEADcfz7u4AZj3Z4Lv0n5FHgYF+xzI7/hGsUfWrAo
DKw0SF7S6or6pFuLEuxP0Cb8eeMyKimsAMdUHs/AOJ0AsyuEvH2JfjpVinnehycc
qNgSEmNYF4lc1SCs/khTNeFJtL7qm1jyYHzizCPXjxRcCLaunK4TugFvEs6mUe/h
/9xeFLkoYAaa2X2pMcEcEI3wcugWhGCMWEMTueTlqigZPiEA7a2REEX2gwZ7cXE2
dVc/IEMlJc2lDCD7gV3CdFnqalRacgG9NptuZbH2dVtDvWs1r0vSvvdVZa+GJy6D
8MvzAiiH/2sv6a32ZKyC+6c4jM7yZsa0wYIX7OPD6tpf8+vWIQ/dUEKMaEOf8v1t
ppIGgcCYujqh0KOdNHfGdIJGYoB3uoWyBDyKxuTC3hrc23M35R6gNxPJtiuoovBx
JDiVl8h5lP1mdGveVDJ7vPjJqws1YRmcoyE8oVe3Vkx2vT24v44M457YDRLdnQQj
hZPF1Q4wZophJYwjP0WCYGp4d3W7iNA=
=nj0z
-----END PGP SIGNATURE-----

<<attachment: lists.vcf>>

_______________________________________________
Product-Developers mailing list
[email protected]
https://lists.plone.org/mailman/listinfo/plone-product-developers

Reply via email to