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 0 1208 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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...
|
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 = ,
|
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...
|
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....
|
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
| |
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
|
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
|
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
|
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
|
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...
|
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,...
| |
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...
|
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...
|
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...
|
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();...
|
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...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |