On 23/03/2015 15:35, Ben Boeckel via Digitalmars-d-announce wrote:
Running a Python script to generate D code?
Yes, in DUB you can run arbitrary external commands before and after the
D sources compilation.
But not in between? Basically, can you have a tool written in D built
with the project and then used to generate code in the same project?
That should be possible if you split it into two bundles or so, if I
understood that case correctly. The external commands run before and
after a compilation of a bundle (known in DUB as "package"). So you
1. bundleA - pre external commands
2. bundleA - D sources compilation
3. bundleA - post external commands
4. bundleB - pre external commands
5. bundleB - D sources compilation
and so on.. (if bundleA is set as a dependency of bundleB)