Re: [Zope3-Users] Buildout bug?
David Pratt wrote: Hi Jim. I think ${name} or ${part} would be good. Sorry for poor example. baz in prev example could be a version or other differentiating information to form a path name. Here's a better example though there is many places this could be used. extra-options = --datadir=${software:prefix}/share/${name} BTW, can you think of anyway to work around the first issue for buildout part. For substitution to work, could buildout part have its own dict as a data source for substitution prior to files being configured as a special case). Then after config do the routine substitution. So you could have something like the following. Thing is this is a pretty small example and when you get a number of configurations going with long paths, well its sort of looks ugly too, especially if you are using urls or paths that may be the same. Sorry, should have clarified that it is the scenario with the long long paths or urls that is undesirable. The first case below represents what I'd rather see which keeps it fairly clean. [buildout] develop = . parts = somepart anotherpart etc = p1=/somewhere/in/my/filesystem p2=/just/another/somewhat/long/path extends = ${etc:p1}/bar.cfg ${etc:p1}/smallbar.cfg ${etc:p1}/bigbar.cfg ${etc:p2}/baz.cfg contrast this with the following without the prefixes: [buildout] develop = . parts = somepart anotherpart extends = /somewhere/in/my/filesystem/bar.cfg /somewhere/in/my/filesystem/smallbar.cfg /somewhere/in/my/filesystem/bigbar.cfg /just/another/somewhat/long/path/baz.cfg Regards, David Jim Fulton wrote: On Feb 14, 2008, at 5:59 PM, David Pratt wrote: One other thing that I have not yet seen is using the part name within the part which would be useful. Something like: [foobar] baz = bar log = /some/path/${foobar:?}-${foobar:baz}.log I don't follow the example. I can thing of perhaps similar examples: log = /some/path/${name}-something.log where ${name} refers to the part name. I definitely want to do something like this. I'm not sure what syntax should be used. Jim -- Jim Fulton Zope Corporation ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Buildout bug?
Hi Jim. I think ${name} or ${part} would be good. Sorry for poor example. baz in prev example could be a version or other differentiating information to form a path name. Here's a better example though there is many places this could be used. extra-options = --datadir=${software:prefix}/share/${name} BTW, can you think of anyway to work around the first issue for buildout part. For substitution to work, could buildout part have its own dict as a data source for substitution prior to files being configured as a special case). Then after config do the routine substitution. So you could have something like the following. Thing is this is a pretty small example and when you get a number of configurations going with long paths, well its sort of looks ugly too, especially if you are using urls or paths that may be the same. [buildout] develop = . parts = somepart anotherpart etc = p1=/somewhere/in/my/filesystem p2=/just/another/somewhat/long/path extends = ${etc:p1}/bar.cfg ${etc:p1}/smallbar.cfg ${etc:p1}/bigbar.cfg ${etc:p2}/baz.cfg contrast this with the following without the prefixes: [buildout] develop = . parts = somepart anotherpart extends = /somewhere/in/my/filesystem/bar.cfg /somewhere/in/my/filesystem/smallbar.cfg /somewhere/in/my/filesystem/bigbar.cfg /just/another/somewhat/long/path/baz.cfg Regards, David Jim Fulton wrote: On Feb 14, 2008, at 5:59 PM, David Pratt wrote: One other thing that I have not yet seen is using the part name within the part which would be useful. Something like: [foobar] baz = bar log = /some/path/${foobar:?}-${foobar:baz}.log I don't follow the example. I can thing of perhaps similar examples: log = /some/path/${name}-something.log where ${name} refers to the part name. I definitely want to do something like this. I'm not sure what syntax should be used. Jim -- Jim Fulton Zope Corporation ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Buildout bug?
On Feb 14, 2008, at 5:59 PM, David Pratt wrote: One other thing that I have not yet seen is using the part name within the part which would be useful. Something like: [foobar] baz = bar log = /some/path/${foobar:?}-${foobar:baz}.log I don't follow the example. I can thing of perhaps similar examples: log = /some/path/${name}-something.log where ${name} refers to the part name. I definitely want to do something like this. I'm not sure what syntax should be used. Jim -- Jim Fulton Zope Corporation ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Buildout bug?
Hi Jim. Thank you for your reply. I use a number of separate config files for buildouts, some with longer paths - was hoping to shorten them up a bit to make them clearer (particularly if they originate from same root). One other thing that I have not yet seen is using the part name within the part which would be useful. Something like: [foobar] baz = bar log = /some/path/${foobar:?}-${foobar:baz}.log Many thanks. Regards, David Jim Fulton wrote: On Feb 14, 2008, at 2:58 PM, David Pratt wrote: Hi. I have done some fairly sophisticated buildouts over the past year but here's something I have not done with an extension before now that I thought ought to be possible: [buildout] extends = ${some-part:path}/foo/bar.cfg [some-part] path = /some/where/on/my/filesystem This produces an error while initializing since it is unable to find the file but works correctly if the full path is provided. I use substitutions like this all over the place. Should they not work in the buildout part as well? Many thanks. Substitutions don't work for extends because extension (assembling files to create a configuration database) happens before substitutions. Jim -- Jim Fulton Zope Corporation ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] Buildout bug?
On Feb 14, 2008, at 2:58 PM, David Pratt wrote: Hi. I have done some fairly sophisticated buildouts over the past year but here's something I have not done with an extension before now that I thought ought to be possible: [buildout] extends = ${some-part:path}/foo/bar.cfg [some-part] path = /some/where/on/my/filesystem This produces an error while initializing since it is unable to find the file but works correctly if the full path is provided. I use substitutions like this all over the place. Should they not work in the buildout part as well? Many thanks. Substitutions don't work for extends because extension (assembling files to create a configuration database) happens before substitutions. Jim -- Jim Fulton Zope Corporation ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
[Zope3-Users] Buildout bug?
Hi. I have done some fairly sophisticated buildouts over the past year but here's something I have not done with an extension before now that I thought ought to be possible: [buildout] extends = ${some-part:path}/foo/bar.cfg [some-part] path = /some/where/on/my/filesystem This produces an error while initializing since it is unable to find the file but works correctly if the full path is provided. I use substitutions like this all over the place. Should they not work in the buildout part as well? Many thanks. Regards, David ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users