This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ciantic
Recipients ciantic, tarek
Date 2009-12-22.14:35:11
SpamBayes Score 2.7316664e-08
Marked as misclassified No
Message-id <1261492513.72.0.435888181618.issue7562@psf.upfronthosting.co.za>
In-reply-to
Content
Long story short: Sometimes build_ext should be run before build_py, or 
something similar.

As an example when using SWIG and setup.py the build order is incorrect: 
During build_ext the SWIG generates .py files that should be used during 
build_py, but since build_py was already ran this doesn't work.

It would be useful if one could for example define custom order for 
subcommands in setup, in this case like: 

    setup(..., build_order=['build_ext', 'build_py'])

If adding a new keyword argument to setup is not an option, some other 
way to specify custom build order should be considered.

This is common problem especially using SWIG. Discussion about this 
issue was in here http://mail.python.org/pipermail/distutils-sig/2009-
December/015010.html the workaround for SWIG case is to use following 
setup.py:

   #!/usr/bin/env python
   from distutils.core import setup, Extension
   from distutils.command.build_py import build_py

   dist = setup(...)

   # Rerun the build_py
   build_py = build_py(dist)
   build_py.ensure_finalized()
   build_py.run()
History
Date User Action Args
2009-12-22 14:35:13cianticsetrecipients: + ciantic, tarek
2009-12-22 14:35:13cianticsetmessageid: <1261492513.72.0.435888181618.issue7562@psf.upfronthosting.co.za>
2009-12-22 14:35:12cianticlinkissue7562 messages
2009-12-22 14:35:11cianticcreate