[Distutils] Bazaar support for setuptools

Phillip J. Eby pje at telecommunity.com
Fri Jul 20 23:18:57 CEST 2007


At 04:32 PM 7/20/2007 -0400, Barry Warsaw wrote:
>Well, I hacked this together pretty quickly but it seems to work for
>my particular use case.  The Mailman source code is now kept under
>the Bazaar revision control system, and I'm about to merge a branch
>that converts the Mailman 3 branch from autoconf-based builds to
>setuptools.  So I needed Bazaar support in order to build my sdist
>files and such.
>
>Writing the plugin code was pretty easy after Michael Hudson gave me
>the key bzrlib clues.  Maybe this could be included by default in the
>next version of setuptools?

No, since it relies on a package (bzrlib) that's not in the stdlib or 
bundled with setuptools.

You can, however, just add a setup.py to your module that declares 
the entry point, and upload the whole thing to Cheeseshop.  You can 
even declare its dependency on bzrlib and have that automatically 
installed too, assuming that it's either on the Cheeseshop or you can 
supply a download link or page with download links in your 
setup(find_links=[...]).


>Side note: I found it interesting and a bit annoying that setuptools
>doesn't call find_files_for_bzr() recursively.  It would seem like
>the framework should do the recursion instead of the plugin, as I'd
>think it would be the most common use case.

Well, the assumption is that only the plugin knows whether a 
directory is a candidate for recursion.  Also, some revision control 
systems only keep path information in one place, so trying to call 
the plugin recursively would be redundant.


>In any event, the
>setuptools documentation should probably be clear that it's up to the
>plugin to recurse into subdirectories.

Fair enough; patches welcome.  In fact, feel free to just go ahead 
and check documentation additions right in, just drop me a line and 
let me know what you did so I can double-check and edit if necessary.



More information about the Distutils-SIG mailing list