[Distutils] build subcommand order

Dan Schult dschult at mail.colgate.edu
Thu Mar 25 14:37:27 EST 2004


I have been using swig 1.3 along with distutils to make a package
and I'm having trouble with the subcommand order for "build".
The order is set at the bottom of command.build.py to be:
build_py
build_clibs
build_ext
build_scripts

My problem is that swig gets run during build_ext and creates a 
class definition in a new *.py file.  That python file needs to 
be moved into the staging area, but build_py doesn't find it 
because it is created AFTER build_py is run.

I propose a simple change of the order of the build commands
so that build_py is last.  

It is unlikely that build_py would make any actions that 
affect the other command, but quite likely (especially given 
the nature of Swig) that other actions may create
python files.

I know one can always use:
python setup.py build_ext build_py
but I don't think every person that is packaging
(or unpackaging) a swig distribution should have to
document that --or figure it out.

If there is a better place to submit changes/improvements
please le me know.

Thanks for a Great Package!!
Dan Schult



More information about the Distutils-SIG mailing list