On 6 Jan, 2007, at 2:07, Phillip J. Eby wrote:

At 04:35 PM 1/5/2007 -0800, Scott Robertson wrote:
I'm trying to create a package that provides a setuptool command that will compile idl files when you run python setup.py build or python setup.py
install.

I've figured out how to add an additional command (build_omniidl) which I
can run with:
   python setup.py build_omniidl

But I'm not sure how to wire it up so that
  python setup.py build

automatically invokes build_omniidl for me. Basically I want build_omniidl
to act just like build_python.


Is this even possible with setuptools?

It's possible even with the distutils. What you need is to subclass the distutils 'build' command class, and then pass your subclass in via the
'cmdclass' dictionary argument to setup().

In setuptools 0.7, I plan to allow adding support for these kinds of
extensions using entry points, so that subclassing isn't needed.

Another alternative is to tweak distutils.commands.build.build.sub_commands, which is more convenient than subclassing.

Ronald

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Distutils-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to