On Wed, Nov 11, 2009 at 11:13 PM, Tarek Ziadé <ziade.tarek@gmail.com> wrote:
Or it is just that you want to get the "--prefix" value finalized and computed by the install command.
Yes.
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.
Where is the sysconfig sources ? I don't see it in bitbucket.
Sorry, I can see it yet, it still fuzzy. Does that mean your binary distribution will not be relocatable ?
Relinking was just an example, but yes, the binary would not relocatable in that case (although you can actually build relocatable binaries through $ORIGIN, but we are not here to talk about advanced deployment issues of binaries). Just to be clear, I am not advocating distutils to do it or even implement it at all, just to make it possible.
This is similar to getting the command, (instanciate it + finalize it if it doesn't exists yet) and return a finalized option.
This does not solve the issue IMHO. Since we both seem to like thinking about use-cases, consider this use-case: you have a python package with a complex extension built with make (say you have a build_make command which calls a makefile). How do you do it ? How to communicate path informations, compiler options between make and distutils ? How to handle relinking (changing rpath at install time) ?
I don't know for the first part. I have to try it out. Can you provide me such an extension ?
Not for make, but I can try to port numpy.distutils.command.scons to distutils (or distribute). The current code is damn ugly (I did most of it when I started digging into distutils), but you can get an idea here: http://github.com/cournape/numpy/blob/master/numpy/distutils/command/scons.p... It calls scons, and you can thus build any C extension using scons. Now, both distutils and scons makes this difficult (in particular, there is no way to call scons from distutils, you need to launch scons executable). For me, one of the core idea of an improved distutils would be to make this much easier. All compilers options form distutils would be in simple data files with simple API, no objects, no class with countless methods and complex protocol. Distutils v2 would have a default "dumb" build tool, but you could use whatever tool instead if desired. David