Yes, Python is written in C, but it is responsible for providing the good flags so that extensions are compatible with the interpreter (there is an option is Python steup for the C++ compiler for instance).
The exemple you give is valid for GCC, but is not for other compilers that will crash with this kind of options. In fact, it would be far better if Python provided out of the box a correct set of flags for g++ (and for the other C++ compilers). I have to say that with ICC, there are far more warning than for gcc.

Matthieu

2007/7/23, Xavier Gnata <gnata@obs.univ-lyon1.fr>:
http://deluge-torrent.org/svn/tags/deluge-0.5.0/setup.py seems to
provide us with a clean?? way to do that.

> Hi,
>
> Well the point is that matplotlib in writtenin C++ and python is written
> in C.
> The valid gcc options are not the same in C and in C++ so it looks
> strange (and it is a pity) if distutils do not provide the user with a
> way to modify these flag in this case.
> XAvier
>
>
>> Hi,
>>
>> Matplotlib uses the distutils facilities to build the extension code.
>> Unfortunately, it is not possible to add or remove compiler flags,
>> distutils uses the same flags as Python when it was built. So this
>> should probably be sent to the Python users ML.
>>
>> Matthieu
>>
>> 2007/7/23, Xavier Gnata <gnata@obs.univ-lyon1.fr
>> <mailto: gnata@obs.univ-lyon1.fr>>:
>>
>>     Hi,
>>
>>     It would be great to be able to compile matplotlib without a
>>     warning :)
>>     Unfortunately, I was not able to fix this warning performing a simple
>>     grep into the sources:
>>     "cc1plus: warning: command line option "-Wstrict-prototypes" is valid
>>     for Ada/C/ObjC but not for C++"
>>     It looks like this option is automagically added by the build
>>     script in
>>     a way I fail to understand reading quickly the sources.
>>     Anyway, there should be a simple solution to avoid this warning (gcc
>>     version 4.1.3)...
>>     Any comments?
>>
>>     Xavier
>>
>>     --
>>     ############################################
>>     Xavier Gnata
>>     CRAL - Observatoire de Lyon
>>     9, avenue Charles André
>>     69561 Saint Genis Laval cedex
>>     Phone: +33 4 78 86 85 28
>>     Fax: +33 4 78 86 83 86
>>     E-mail: gnata@obs.univ-lyon1.fr <mailto:gnata@obs.univ-lyon1.fr>
>>     ############################################
>>
>>
>>     -------------------------------------------------------------------------
>>
>>     This SF.net email is sponsored by: Splunk Inc.
>>     Still grepping through log files to find problems?  Stop.
>>     Now Search log events and configuration files using AJAX and a
>>     browser.
>>     Download your FREE copy of Splunk now >>   http://get.splunk.com/
>>     _______________________________________________
>>     Matplotlib-users mailing list
>>     Matplotlib-users@lists.sourceforge.net
>>     <mailto:Matplotlib-users@lists.sourceforge.net>
>>     https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>>
>> ------------------------------------------------------------------------
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by: Splunk Inc.
>> Still grepping through log files to find problems?  Stop.
>> Now Search log events and configuration files using AJAX and a browser.
>> Download your FREE copy of Splunk now >>   http://get.splunk.com/
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Matplotlib-users mailing list
>> Matplotlib-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>>
>
>
>


--
############################################
Xavier Gnata
CRAL - Observatoire de Lyon
9, avenue Charles André
69561 Saint Genis Laval cedex
Phone: +33 4 78 86 85 28
Fax: +33 4 78 86 83 86
E-mail: gnata@obs.univ-lyon1.fr
############################################