Distutils places 'extra_compile_args' in the wrong place?

greg.alpedhuez at gmail.com greg.alpedhuez at gmail.com
Tue Mar 7 17:31:35 CET 2006


I'm completely new to this, but trying to compile some code I've been
given which uses the python Distutils stuff.  I need to pass some
compiler directives to gcc, and the documentation suggests that the
parameteres 'extra_compile_args' can be used.  However, this does so
AFTER the rest of the arguments, including the -o output name and the
sourcecode file name, so gcc ignores it (and tells me that it is doing
so).

How do I get my compiler directives passed correctly?
How do I find the other directives that setup.py seems to put in by
default?

My current setup.py:
-------------------
setup (name = "extension",
       description = " Extension to Python",
       ext_modules = [Extension('PyHST_c',

['PyHST_c.c',"c_hst_recon_1over.c","Vhst_fourier.c","Vhst_calculate_limits.c"],

define_macros=[('MACRO1','1'),('MACRO2',None)],

extra_compile_args=['-TOOLATETOHAVEEFFECT'],
                                libraries=['pthread','gcc','m']),
      	
                     ]

       )
---------------
Cheers,
greg




More information about the Python-list mailing list