Re: [Zope3-dev] RFC: Zope Configuration Egg Support

2006-10-23 Thread Jim Fulton

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.




Or does egg magic only do that for python files?


Do what?


Because you then get the problem if you switch between an egg version
and a non-egg version of a module...


I don't know what you are getting at.

Supporting eggs explicitly will allow dealing with a number of situations:

- namespace packages (like zope.app)

- zipped eggs

- eggs with names that aren't the same as the names of
  packages they contain.

- Entry points.

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://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



Re: [Zope3-dev] RFC: Zope Configuration Egg Support

2006-10-23 Thread Nathan R. Yergler

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


I like; this would be really useful for us at Creative Commons.  I
also like Philipp's idea of being able to say something like

include egg=zope.app.container=3.4 /

To get a specific version.

Will using the include egg.. syntax also imply that the egg is added
to the working set/python path, or is it assumed that will be handled
via a wrapper script (like one generated using buildout)?


Nathan



Comments welcome.

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://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/nathanyergler%40gmail.com



___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] RFC: Zope Configuration Egg Support

2006-10-23 Thread Jim Fulton

Nathan R. Yergler 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


I like; this would be really useful for us at Creative Commons.  I
also like Philipp's idea of being able to say something like

include egg=zope.app.container=3.4 /

To get a specific version.

Will using the include egg.. syntax also imply that the egg is added
to the working set/python path,


No.  The include directive is specifying a configuration file
to load, nit which egg to use in an application.


or is it assumed that will be handled
via a wrapper script (like one generated using buildout)?


Yes.

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://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



Re: [Zope3-dev] RFC: Zope Configuration Egg Support

2006-10-23 Thread Lennart Regebro

On 10/23/06, Jim Fulton [EMAIL PROTECTED] wrote:

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.


Ick. That's a lot of ifs...


 Because you then get the problem if you switch between an egg version
 and a non-egg version of a module...

I don't know what you are getting at.


Well, if you have to say egg when it's a zipped egg and package
when it's a package, then you can't support both at one time, which
means that to support the egg you have to use include egg=.. / and
then it stops working if it's not an egg. This is basically bad,
although I guess it's acceptable if these are very unusual
circumstances (which seems to be what people are saying further down
in this thread).

--
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.nuxeo.org/
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] RFC: Zope Configuration Egg Support

2006-10-23 Thread Jim Fulton

Jim Fulton wrote:


I've created a small proposal to add egg support to zope.configuration:

  http://zope3.zwiki.org/ZopeConfigurationEggSupport

Comments welcome.


Thanks for the many comments.

I've decided to retract this proposal in favor of

  http://zope3.zwiki.org/ZIPImportSupportForZope3

I hope that someone can find time to merge the work already
done on this to the trunk soon so we can start leveraging it.

I think we can ignore, at least for now, the use cases related
to loading files from namespace packages and loading package data
from eggs whos names are different from package names.

I think that more thought needs to go into the filereference API.

I'll have to find a different hack for zope.app.  I'll try to find
time to update that proposal in the next day or so.

I'll also create a separate proposal for loading Python-defined
configuration.

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://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