calling extension's autoconf/make from distutils

G

Gary Jefferson

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
 
G

Gary Jefferson

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
 
S

Steve Holden

Gary said:
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
 
S

Steve Holden

Gary said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top