473,385 Members | 2,274 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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 1191

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Brian Victor | last post by:
I am attempting to distribute my wxPython program with the aid of distutils. I have one C++ module that needs to built on the user's machine. When I run "./setup.py build", the following appears...
0
by: Andrew Gregory | last post by:
In Python 2.2, I compiled some C++ code on Windows (MinGW compiler) to create an extension using distutils and the following setup.py file: from distutils.core import setup, Extension setup...
1
by: Peter Schmiedeskamp | last post by:
Hello, I'm writing in regard to the distutils package for python. I regularly repackage installers for silent/automated distribution on numerous Windows PCs throughout an enterprise. Sites such...
2
by: Mike Meyer | last post by:
Ok, I give up. I searched the CVS code, and can't find the place that turns an include_dirs option in setup.cfg into a list of directories. The reason I was looking for it is that I can't figure...
7
by: Frans Englich | last post by:
This is silly. How do I access data files I've installed with distutils? In a portable, generic way, I want to find out what is the following path on most systems: ...
2
by: RickMuller | last post by:
I really appreciate the ease that the distutils make distributing Python modules. However, I have a question about using them to distribute non-Python (i.e. text) data files that support Python...
0
by: jeremito | last post by:
I am using distutils to comiple/install a c extension created with SWIG. However I need to be able to specify the output filename from gcc. I tried doing this with the "extra_compile_args" and...
7
by: Eric S. Johansson | last post by:
is there anyway I can, in a setup.py file, set and internal equivalent to the '--install-scripts' commandline option? script installation directory but I don't want on the command line where...
2
by: Kirill Simonov | last post by:
Hi, I've written a pure Python module, which could optionally use an external C library. The external library is not required to be on the user computer however, so I'd like not to build the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.