[issue7562] Custom order for the subcommands of build

Marc-Andre Lemburg report at bugs.python.org
Tue Dec 22 22:18:37 CET 2009


Marc-Andre Lemburg <mal at egenix.com> added the comment:

The distutils way of implementing a different fixed order would be to
create a build command sub-class, override the .sub_commands list and
then register this new subclass as 'build' command with distutils via
the cmdclass setup() keyword argument. (eGenix uses this approach in
mxSetup.py - see egenix-mx-base)

Note that I don't think that just providing an alternative order of
build_py and build_ext would solve the SWIG issue - e.g. build_py
wouldn't know about the new files SWIG generates unless the SWIG build
process explicitly tells the build_py command about these new files.

It would probably be better to add a completely new command just for
managing the SWIG build process to distutils. This could then add the
generated files, run build_ext with the required special arguments,
rerun build_py, etc.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7562>
_______________________________________


More information about the Python-bugs-list mailing list