471,123 Members | 897 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,123 software developers and data experts.

changing build order for SWIG extensions

Hi all.
How do I tell distutils to run build_ext before build_py when I try to
do a

'python setup.py build' ?

I have a C extension using SWIG, and when I build with setup.py,
build_py runs on the current module.py file before swig
creates/recreates it. I got around it by just putting in another call
to setup for the py_module, but if I try to create a bdist, the second
call to setup over writes the first w/o the _module.so file.

(bottom of setup.py)

# build extension module
setup (name = 'OTB_libs',
author="Tim Williams",

#this needs to be built after the extension is since OTB_libs.py is
#generated by SWIG
setup (name='OTB_libs',
author="Tim Williams",

Am I stuck with just calling running 'python setup.py build' twice?

Thanks for any help.

Jul 19 '05 #1
0 980

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Alexandre Gillet | last post: by
1 post views Thread by Grant Edwards | last post: by
1 post views Thread by superprad | last post: by
reply views Thread by Roland Hedberg | last post: by
2 posts views Thread by John Nagle | last post: by
7 posts views Thread by John Nagle | last post: by
6 posts views Thread by Adam C. | last post: by
2 posts views Thread by mk | last post: by
3 posts views Thread by code_berzerker | last post: by

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.