Closed refi64 closed 10 years ago
Thanks, looks good - but I'm just off to bed so I'll review this properly tomorrow.
Two things:
wget https://fabricate.googlecode.com/git/fabricate.py
to get the fabricate.py script (see https://github.com/ndmitchell/build-shootout/blob/master/travis.sh#L19). Is yours different/better than that one?I don't think the wildcard example is correct. It defines a target named build
which copies all the .in
files over. But the example is meant to take an arbitrary name (e.g. name953794.out
) as the target and just produce that file. The travis output reads:
wildcard fabricate ... 'name953794.out()' command not defined! System command failed: python wildcard-fabricate.py --quiet -j1 "name953794.out"
I suspect that means it isn't doing what the test calls for. Can you do that in Fabricate? I suspect not, as Fabricate targets have to be functions, and you can't have an infinite number of them.
PS. I note you've contributed to Sake, and I'd welcome Sake patches for the build-shootout :)
git add *.py
and forgot that I had put fabricate in the same directory.I'll probably will add Sake examples; I had forgotten about that.
I think I fixed the issues. Let me know if you find anything else.
If you want, I can squash the commits.
Sorry, I managed to miss the email with the fixes in. I'll review tonight once my son goes to sleep. No need to squash the commits, I'm not that fussy about the repo history. Thanks!
Thanks, I've merged that all in. I would have expected the fabricate wildcard example to read more along the lines of:
for each f in args()
globals()[base] = type(base, (object,), {'out': get_cp(f, base+'.out')})
main()
e.g. populate the targets based on the command line, not the presence of files it works for. However, the idea of filling in all the sensible targets works quite nicely, it's certainly in the ballpark - and is using fabricate in a new and interesting way, so arguably is worth including just for that. Nice.
This pull request:
str.replace
instead of turning string to list and back to string