Rocky Burt wrote:
On Mon, 2006-23-10 at 06:48 -0400, Jim Fulton wrote:
Lennart Regebro wrote:
On 10/22/06, Jim Fulton <[EMAIL PROTECTED]> wrote:
I've created a small proposal to add egg support to zope.configuration:

   http://zope3.zwiki.org/ZopeConfigurationEggSupport
Shouldn't the egg work as a package, so that you still can use the
package attribute?
If an egg installs a package and if the package isn't a namespace
package, and if the egg isn't zipped, then yes, the package mechanism
will work.

Yeah I have to admit I'm a little confused here as well.  I thought the
promise of eggs was that whatever's contained within ... as long as the
egg is on the PYTHONPATH ... would automatically have it's packages made
available for import.

Yes

Seems strange to have to differentiate between
"regular" packages and egg-available packages.  Perhaps I'm expecting
too much from eggs... having been spoiled by jars.

We aren't taking about import. We are talking about reading files.

You can't use the same API for reading files from eggs (or jars) and
for reading files from a file system.  The current package option
reads data from the file system.

Perhaps we should change the package option so that it uses the pkg_resources
API to load ZCML files from packages.  There are still cases where egg != 
package
that would need to be addressed specifically.

Does the API which provides egg support have anything like this?
http://java.sun.com/javase/6/docs/api/java/lang/ClassLoader.html#getResource(java.lang.String)

If so, I would expect the ZCML loading mechanism to simply use that when
looking for zcml files.

We're not taking about import or loading objects from Python modules. We're 
talking about
loading files.

Jim

--
Jim Fulton           mailto:[EMAIL PROTECTED]       Python Powered!
CTO                  (540) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org
_______________________________________________
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to