473,378 Members | 1,372 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,378 software developers and data experts.

calling extension's autoconf/make from distutils

I've got a python extension that comes with its own standard autoconf/
automake system, and I can "python setup.py build" just fine with it
as long as I have previously done "./configure" in that directory.

However, 'python setup.py bdist_rpm' can't hope to have done './
configure' first, as it untars and tries to build the extension there.

Is there a hook for bdist_rpm (and friends) that will allow me to
insert a './configure' in the build process, sometime before it tries
to build the extension?

Thanks,
Gary

Sep 21 '07 #1
3 1744
On Sep 20, 10:43 pm, Gary Jefferson <garyjefferson...@yahoo.com>
wrote:
I've got a python extension that comes with its own standard autoconf/
automake system, and I can "python setup.py build" just fine with it
as long as I have previously done "./configure" in that directory.

However, 'python setup.py bdist_rpm' can't hope to have done './
configure' first, as it untars and tries to build the extension there.

Is there a hook for bdist_rpm (and friends) that will allow me to
insert a './configure' in the build process, sometime before it tries
to build the extension?

Thanks,
Gary

I ended up simply subclassing 'Extension' and having it os.system('./
configure') before proceeding.

This isn't perfect, as it does the './configure' everytime, but it
works.

Gary

Sep 21 '07 #2
Gary Jefferson wrote:
On Sep 20, 10:43 pm, Gary Jefferson <garyjefferson...@yahoo.com>
wrote:
>I've got a python extension that comes with its own standard autoconf/
automake system, and I can "python setup.py build" just fine with it
as long as I have previously done "./configure" in that directory.

However, 'python setup.py bdist_rpm' can't hope to have done './
configure' first, as it untars and tries to build the extension there.

Is there a hook for bdist_rpm (and friends) that will allow me to
insert a './configure' in the build process, sometime before it tries
to build the extension?

Thanks,
Gary


I ended up simply subclassing 'Extension' and having it os.system('./
configure') before proceeding.

This isn't perfect, as it does the './configure' everytime, but it
works.
If it really is a one-off thing, you only need to ruin configure if
config-status doesn't exist. That isn't a difficult check ...

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://del.icio.us/steve.holden

Sorry, the dog ate my .sigline

Sep 21 '07 #3
Gary Jefferson wrote:
On Sep 20, 10:43 pm, Gary Jefferson <garyjefferson...@yahoo.com>
wrote:
>I've got a python extension that comes with its own standard autoconf/
automake system, and I can "python setup.py build" just fine with it
as long as I have previously done "./configure" in that directory.

However, 'python setup.py bdist_rpm' can't hope to have done './
configure' first, as it untars and tries to build the extension there.

Is there a hook for bdist_rpm (and friends) that will allow me to
insert a './configure' in the build process, sometime before it tries
to build the extension?

Thanks,
Gary


I ended up simply subclassing 'Extension' and having it os.system('./
configure') before proceeding.

This isn't perfect, as it does the './configure' everytime, but it
works.
[Sorry: it's config.status you shoudl check for, not config-status].

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://del.icio.us/steve.holden

Sorry, the dog ate my .sigline

Sep 21 '07 #4

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

Similar topics

0
by: yzzzzz | last post by:
Hi, I am compiling PHP 5.0.2 myself with MySQL support. I did a ./configure --with-mysqli=/usr/local/mysql/bin/mysql_config (see end of post for complete configure) Note: I also have...
2
by: Michael Ströder | last post by:
HI! Is it possible to probe for installed libs with DistUtils? I'd like to automatically search for optional libs and adjust C compiler switchers before starting the build of a the extension...
2
by: Jerry He | last post by:
Hi, I was trying to build a C++ extension on Win32 with distutils. The extension worked on Cygwin but when I tried it with the Win32-build python, it complained that I don't have .NET Framework...
2
by: Joachim Dahl | last post by:
I am trying to make a customized install script for an extension module using the distutils.ccompiler class. I want to embed an existing makefile for the C libraries into the Python setup...
2
by: Laszlo Zsolt Nagy | last post by:
How how can I install my .mo files from a distutil script into its default location? sys.prefix + os.sep + 'share' + os.sep + 'locale'
46
by: Usenet User | last post by:
I need to be able to call the same API function from VB, which will reside in different DLLs. While all of the functions have the same signature and name, DLL file names are not known at compile...
1
by: Mark Asbach | last post by:
Hi pythonians, I'm one of the maintainers of an open source image processing toolkit (OpenCV) and responsible for parts of the autotools setup. The package mainly consists of four shared...
0
by: bgold12 | last post by:
I know I asked this a few days ago, but I didn't really get a satisfactory answer, and I know the people in this group are better than that... Is there a .dll file I can download for the BBCode...
0
by: noobermin | last post by:
An extension I used uses some other functions i made (outside of the sources used by the extension itself), but it complains about them upon import as being undefined symbols. >>> import...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...

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.