Distutils places 'extra_compile_args' in the wrong place?

G

greg.alpedhuez

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']),

]

)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top