473,672 Members | 2,597 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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('PyHS T_c',

['PyHST_c.c',"c_ hst_recon_1over .c","Vhst_fouri er.c","Vhst_cal culate_limits.c "],

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

extra_compile_a rgs=['-TOOLATETOHAVEEF FECT'],
libraries=['pthread','gcc' ,'m']),

]

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

Mar 7 '06 #1
0 1208

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

Similar topics

1
1697
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 on the terminal: gcc -DNDEBUG -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC -Isrc -I/usr/include/python2.2 -c src/bwaa.cc -o build/temp.linux-ppc-2.2/bwaa.o -I/usr/local/lib/wx/include/gtk-2.4 -DGTK_NO_CHECK_CASTS...
0
1566
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 (name = "_pysimple", version = "1.0", maintainer = "AG", maintainer_email = "xxx@xx.co.uk", description = "Sample Python C++ DLL", ext_modules = ,
1
2795
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 as AppDeploy (http://www.appdeploy.com) and tools such as WISE all suggest that this is a pretty common task. Increasingly, however, I've found that tools like WISE's setup capture are becoming less relevant for this task. Rather than running...
2
2318
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 out how to make include_dirs include multiple directories from setup.cfg. Everything I try winds up putting -I<contents_of_include_dirs>. I couldn't even find the place where the string value that is returned by ConfigParser is enclosed in a list....
7
2300
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: /usr/local/lib/python2.4/lib/site-packages/foo/bar.txt How do I figure out the rest, if I know foo/bar.txt? sys.prefix doesn't get me far. I've googled, and looked in the python reference. I must be blind if the
2
2664
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 modules. Currently when I have data of this type, I parse it into python objects and make a python module from it. In other words, given a data file like % cat grocery_list.txt eggs spam
0
947
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 "extra_link_args" by setting them equal to "-o MyOutputName.so" but that didn't work. Can someone show me how to specify the output name? Thanks, Jeremy
7
1533
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 things can go horribly wrong if the user forgets. I would like to create a new default setting for this commandline option as well as a couple of other such as the data default directory. --- eric
2
1619
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 bindings by default, but allow a user to turn the build on by specifying some parameter to `setup.py`. Basically, it should work like ./configure --with-some-lib Unfortunately I'm not quite sure how to implement this and I'm already
0
8486
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8404
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8931
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8828
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8680
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5705
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4227
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2063
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1816
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.