Recursive search of dependencies in z3c.autoinclude
Hi, I release z3c.autoinclude with a lot of attributes for directives "includeDependencies" and "includeDependenciesOverrides". Mercurial repository with my fork - https://bitbucket.org/cykooz/z3c.autoinclude. Recursive search of dependencies -------------------------------- <includeDependencies package="." recursive="True" /> This looks up and includes all respective ZCML files of packages you declared to depend on in setup.py. This works recursive so that if packages in your setup.py depend on others the latters are looked up too and so on (and everything in the right order). Disabling autoinclude some packages ----------------------------------- <includeDependencies package="." recursive="True" ignore="zope.app.zcmlfiles ice.control" /> This not include packages `zope.app.zcmlfiles` and `ice.control`, but include their dependencies. TODO: * Add ability for create "autoconfigure.zcml" file for decrease startup time. PS: I would be glad if my changes will merge with main branch.
Hey, These sound good to me, as long as they're off by default, have tests, and don't break existing behavior.
<includeDependencies package="." recursive="True" ignore="zope.app.zcmlfiles ice.control" />
This not include packages `zope.app.zcmlfiles` and `ice.control`, but include their dependencies.
Does ignore="" work on namespaces, or exact package names? What would happen if you did ignore="zope" instead? Either way, could you add a test clarifying this behavior in dependency.txt?
TODO: * Add ability for create "autoconfigure.zcml" file for decrease startup time.
You mean, a static ZCML file that contains all the <include> directives that z3c.autoinclude auto-includes, in the right order? This is very cool -- I've always wanted to do this but never gotten around to it. The version number in CHANGES.txt and setup.py should be changed to 0.4.0, not 0.3.5 -- these are all new features. Do you have commit rights to merge these? -Ethan On Wed, Apr 6, 2011 at 3:28 PM, Cykooz <cykooz@googlemail.com> wrote:
Hi, I release z3c.autoinclude with a lot of attributes for directives "includeDependencies" and "includeDependenciesOverrides". Mercurial repository with my fork - https://bitbucket.org/cykooz/z3c.autoinclude.
Recursive search of dependencies --------------------------------
<includeDependencies package="." recursive="True" />
This looks up and includes all respective ZCML files of packages you declared to depend on in setup.py. This works recursive so that if packages in your setup.py depend on others the latters are looked up too and so on (and everything in the right order).
Disabling autoinclude some packages -----------------------------------
<includeDependencies package="." recursive="True" ignore="zope.app.zcmlfiles ice.control" />
This not include packages `zope.app.zcmlfiles` and `ice.control`, but include their dependencies.
TODO: * Add ability for create "autoconfigure.zcml" file for decrease startup time.
PS: I would be glad if my changes will merge with main branch. _______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
2011/4/13 Ethan Jucovy <ethan.jucovy@gmail.com>:
Does ignore="" work on namespaces, or exact package names? What would happen if you did ignore="zope" instead?
Exact package names. But this good idea about namespaces. I release it later.
TODO: * Add ability for create "autoconfigure.zcml" file for decrease startup time. You mean, a static ZCML file that contains all the <include> directives that z3c.autoinclude auto-includes, in the right order? This is very cool -- I've always wanted to do this but never gotten around to it.
I did this in the latest version. See repository https://bitbucket.org/cykooz/z3c.autoinclude Example: <includeDependencies package="." recursive="True" ignore="zope.app.zcmlfiles ice.control" cachefile="auto_configure.zcml" /> <includeDependenciesOverrides package="." recursive="True" ignore="zope.app.zcmlfiles ice.control" cachefile="auto_overrides.zcml" /> Later I'll write code to verify the need to update the cache.
The version number in CHANGES.txt and setup.py should be changed to 0.4.0, not 0.3.5 -- these are all new features.
Ok. I do this.
Do you have commit rights to merge these?
No, I do not have commit rights.
In last version of my fork 'z3c.autoinlude' I release some new changes: * now can ignore packages by namespace (use name of namespace with dot in the end); * now the file cache is checked for the need to update; * change package version to 0.4.0. PS: Sorry for my English
participants (2)
-
Cykooz -
Ethan Jucovy