[Zope-CMF] Re: Adding python packages to ProductsPath

whit d.w.morriss at gmail.com
Thu Feb 8 13:24:42 EST 2007

Dieter Maurer wrote:
> yuppie wrote at 2007-1-23 18:55 +0100:
>> ...
>> Yes, I object. This is a hack that resolves the issue just for some 
>> special use cases. We need a solution that works with python packages 
>> anywhere in the python path.
> And "packageresources"
> (http://www.handshake.de/~dieter/pyprojects/packageresources.tgz"
> can show a way to do it. An alternative could be the upcoming egg's
> support for egg local resources.
> With "packageresources" a python package/module is identified by
> an url of the form "pypackage:<module_path>", e.g.
> "pypackage:Products.CMFCore" or "pypackage:Shared.DC.ZRDB.DA".
> A resource (e.g. a file or directory) local to a package
> is identified by an url
>    "pypackage:<package_path>/<package_relative_file_path>",
> e.g. "pypackage:Products.CMFCore/skins"
> As you can see: this allows to specifiy location independent
> skin directories.

yeah... I could see something similar being done with setuptools 
entrypoints and then accessed later by using pkg_resources.  Initially 
we could just assume cmfish eggs are unzippable.



------ d. whit morriss ------
- senior engineer, opencore -
- http://www.openplans.org  -
- m: 415-710-8975           -

"If you don't know where you are,
  you don't know anything at all" 

Dr. Edgar Spencer, Ph.D., 1995

More information about the Zope-CMF mailing list