Strict recipe for detail hierarchy

Is there a Python buildout recipe that will allow the following:

[buildout] parts = group-of-parts [group-of-parts] recipe = what.can.i.use.for.this parts = part-1 part-2 [part-1] ... [part-2] ... 

In other words, I need a recipe that accepts the "parts" attribute, similar to the "buildout" section, so I can manually manage the hierarchy of part groups.

Yes, I know that I could:

 [buildout] parts = group-of-parts [group-of-parts] recipe = parts = ${part-1:recipe} ${part-2:recipe} [part-1] ... [part-2] ... 

but relying on the side effect that the details will be built by referencing the attribute from them seems a little obscure. I would prefer it to be more explicit, using a recipe that simply allows you to specify the name of the part itself.

Of course, when expanded and redefined, it looks much cleaner to say:

 [groups-of-parts] parts -= part-2 

than:

 [groups-of-parts] parts -= ${part-2:recipe} 

Either my problem is that I just missed something fundamentally about how buildout works, or I just donโ€™t notice something in the documentation that makes it much cleaner.

And no, I donโ€™t want to have a flat hierarchy where all the parts are listed in the "parts" attribute of the "buildout" section.

+4
source share
3 answers

No, there is no hierarchy, although you could create a recipe for it, of course.

Why do you need this? It doesn't look like you have hundreds of hundreds of parts, so it's hard to keep track of them ...

+1
source

Some time ago I wrote an article on resolving dependencies in buildout . This is not the answer to your question, because what you want does not make much sense, in my opinion. But you can get an idea of โ€‹โ€‹the dependency that the hierarchy of the hierarchy resolution of the hierarchy tree uses.

0
source

You can do it:

 [buildout] development-tools-parts = thing1 thing2 software-parts = thing3 thing4 parts = ${buildout:development-tools-parts} ${buildout:software-parts} 

Did I understand you correctly?

This works because most of these assembly configuration instructions are just lists. What you can add to each other.

I used this sometimes for the base builout configuration ("base.cfg"), from which I would continue. This will give you ${buildout:common-parts} , which you can add to your parts list to get a couple of standard elements. Just to give an example.

0
source

All Articles