469,328 Members | 1,324 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,328 developers. It's quick & easy.

Distutils places 'extra_compile_args' in the wrong place?

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

Mar 7 '06 #1
0 1060

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Brian Victor | last post: by
reply views Thread by Andrew Gregory | last post: by
2 posts views Thread by Mike Meyer | last post: by
7 posts views Thread by Frans Englich | last post: by
2 posts views Thread by RickMuller | last post: by
reply views Thread by jeremito | last post: by
7 posts views Thread by Eric S. Johansson | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by Purva khokhar | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.