calling extension's autoconf/make from distutils

Steve Holden steve at holdenweb.com
Fri Sep 21 18:11:49 CEST 2007


Gary Jefferson wrote:
> On Sep 20, 10:43 pm, Gary Jefferson <garyjefferson... at 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




More information about the Python-list mailing list