What is code? An INI file also contains code, i.e. some text structure that complies with a grammar. You also need a parser to read it programmatically.
You may want to post some references about what's the problem with Python's setup.py, because from what you write, it doesn't seem obvious.
I have written fairly complicated nim-scripts for compilation already.
Take the template for config scripts for Nim-Zend as example. Which gets included into a project like this
Another example is in my nim-screeps config code which does a lot of stuff besides setting some flags as it for example checks the toolchain and compiles other stuff if it is missing and uses those to feed the compilation result to a remote web service all with a simple nim build project.nim.
So yes it allows fairly complex stuff which is not easily to understand by skimming at it. I may even be complicated if you really look at it in detail. So there is no easy way to tell what it does and that is fine for me.
The question is more what you expect from it. Dependencies for example should be part of Nimble and it's configuration. Making that into scripts may indeed make it impossible to tell beforehand what is needed for a specific target system.