Update: Zope2 packaging

Brian Sutherland brian at vanguardistas.net
Sun Jul 3 09:40:05 UTC 2011


Sounds like it's related to the __init__.py used for namespace packages.
I've experienced similar behaviour when it's not around.

https://bugs.launchpad.net/van.pydeb/+bug/619294

On Sun, Jul 03, 2011 at 12:01:57AM +0200, Jonas Meurer wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hey again,
> 
> Good news first: I finally was able to fix the issue where fetch.py
> installed the wrong dependencies into the zope2.12 tarball. Thanks to
> Michael for help with that.
> 
> Now the bad news: A new issue followed immediately. The symptoms are,
> that no zope.app.* modules are found when imported, except one:
> zope.app.appsetup.
> 
> I already digged into this issue, and found out that it has to do with
> some kind of namespace collision. All the zope.app.* eggs contain
> subfolders zope/app/.... It seems like the first one in PYTHONPATH
> occupies the namespace zope.app.
> 
> An example:
> 
> - - Create two folders with modules: 'module1/zope/app/mod1' and
> 'module2/zope/app/mod2'.
> - - Now add both paths 'module1' and 'module2' to the python PATH either
> by listing them in PYTHONPATH environment variable, or by using
> site.addsitedir().
> - - Now try to import both modules: 'import zope.app.mod1' and 'import
> zope.app.mod2'. The former works while the latter doesn't.
> 
> - - If you copy mod1 and mod2 both in the same subfolder
> 'module1/zope/app' instead, both can be imported.
> 
> I'm not sure where the error comes from, but this behaviour is broken.
> With python eggs, it's not an option to copy all zope.app.* modules into
> one single zope/app/ folder.
> 
> Maybe someone has an idea what's up here?
> 
> Greetings,
>  jonas
> 
> PS: I also tried Michaels old python wrapper (written in python): it has
> the same issues. Thus it's not related to the new python wrapper.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
> 
> iQIcBAEBAgAGBQJOD5VOAAoJEFJi5/9JEEn+/5kQAIo0y61hJJs0GVJD2vmTbJGI
> yoGyFXStm/I3m3seZ9L2xn2tw+wmvnut4P1h087yvNjAqizMiDxEXciyfdHOFGXw
> vmIg4Ej5q+Dn6eZsXFg1zmUtMNPiFOanNB1Pcr5r6SqznldLB46LnT/ALOQjxiNR
> lV5clfVEnh3MphUPhULEoC6yM9a+2B6z810Wi+WlFDJPWi8DHkESljEtxu4SVt1n
> 9gzVLy2zIrbLY++QbPoVNvM6Rb5p+N/0jzZqDdUYFa4XoGsfhM4Deme0hGzTuYl4
> ojeVt5AOFc26h0FKXnt9SzOiQDBB6wW7WOyWV3bxIo12TiRv3dyco/8TF3yMdPPD
> CoQkTg7vendFJq40w6DDoEqqkATPO+M41oOBcqSpP4S6DmWaGLGdmyHv7vufMBEr
> Z2hnh8OrZTSIieJknPYZj+k4ym1rcqQpL58xeaDB24Dv3i5XVFNdd81JV3KbzNwF
> iIQh4xH3R1Pfj1bO5nC23gS2bI3Gib1XFDhsd26oWgMGN8smPyuVdmu91nlLDM1u
> aFy5N7UoJ8iV/Shg0a5sKpU+Z4xzqfoBQnDoxEiP1SaL2PPa3C3O7AzkTcGIhATk
> guvq2XRn88zIkt1fEsvH2Fzt+eBGqrND7epB5TkXVnTq+S5cm9+GhGiCI5Gxw8k6
> 16KDyUu+E1yYs3T652Bu
> =SNM1
> -----END PGP SIGNATURE-----
> 
> _______________________________________________
> pkg-zope-developers mailing list
> pkg-zope-developers at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-zope-developers

-- 
Brian Sutherland



More information about the pkg-zope-developers mailing list