At 03:13 PM 11/11/2009 +0100, Tarek Ziadé wrote:
But you call it with "install" in your example, meaning that is is called at install time, right ?
Or it is just that you want to get the "--prefix" value finalized and computed by the install command. If it's the later, I guess you will be able to use the upcoming "sysconfig" module, that gives you the install schemes, depending on sys.prefix/sys.exec_prefix.
The issue is that setup.py can accept multiple commands on the command line, and in principle "build_clib" might be being called as a subcommand of build (and thus of install). So, he needs the *active* --prefix, either from the command line, config file(s), or defaults. Simply having an API to get the defaults won't help this.
Really, getting a finalized "install" command object is the only way to do this correctly in distutils at the moment, and the sysconfig API won't change that.