Federico Di Gregorio wrote:
Il lun, 2003-08-04 alle 10:11, Michiel Jan Laurens de Hoon ha scritto:
Most of the configuration machinery is already available in distutils (via "python setup.py config"), so you may not need to run autoconf/configure at all. In one of my software projects, I was able to get rid of the autoconf/configure stuff altogether by using the corresponding distutils routines. These are much easier to use than autoconf/configure, and also guarantees that you are using the same compiler and compiler options for the config stage and the build stage.
this is another big problem of distutils. how can I tell distutils to *not* use compiler flags from python build but my own? for example, i use assert in devel builds and i don't want NDEBUG to be defined but i get it from a default python 2.3 build (on debian). i know i can rebuild a whole python and then use that for my devel builds but is not handy at all.
It should be possible to undefine NDEBUG using the CFLAGS environment variable. Have a look at distutils/sysconfig.py: customize_compiler().