[RFC] bzr plugins pack for windows && plugins metainfo requirements proposal

Alexander Belchenko bialix at ukr.net
Wed Dec 12 16:13:12 GMT 2007


Alexander Belchenko пишет:
> Hi all plugins writers and plugins users.
> 
> I'd like to inform all interested people that I'd like to start
> work in creating separate windows installer aka "bzr plugins pack"
> for standalone bzr.exe. 

Thinking more about this I led to conclusion that I need to extend 
plugins-pack area to cover and python-based installations as well. 
Unfortunately, functionality of existing products intended to create 
windows installers is too limited for my purpose, so I decide to 
reinvent the wheel and wrote simple installer-like application to manage 
plugins installation/deinstallation/updating. As result -- plugins pack 
will be released later than 1.0 final of bzr itself.

> This in turn require that all bundled plugins should have correct
> meta information inside.
> 
> I'm always tend to automatize installer building tasks, so I want
> to standardize some requirements for plugins intended to inclusion
> in plugins pack.

This morning I realize that all what I need already present as standard 
python library. I talk about distutils library and well known setup.py 
scripts. So I simply switch my proposal to using valid setup.py in 
*each* plugin.

I will not reinvent the wheel and point all to our most polished plugins 
set: BzrTools. Anyone can download tarball and look closely at it. It's 
the classic example what I need to take some plugin on board. Absolutely 
nothing complex:

from distutils.core import setup
import version
setup(name="BzrTools",
       version=version.__version__,
       description="Handy utilities for working with Bazaar (bzr).",
       author="Aaron Bentley",
       author_email="aaron.bentley....",
       license = "GNU GPL v2",
       url="http://bazaar-vcs.org/BzrTools",
       packages=['bzrlib.plugins.bzrtools', 
'bzrlib.plugins.bzrtools.tests'],
       package_dir={'bzrlib.plugins.bzrtools': '.', })

That's all I need: plugin short description, version, license, info 
about the author (the name is enough). These bits are *mandatory*. And 
of course instructions where the code should be installed.

And please, don't try to import bzrlib inside setup.py, like this:

import bzrlib.plugins.foo

Because it will not work. At all. Yep.

If your package already has setup.py -- I'll try to help fix it if there 
is something incorrect. If you don't have setup.py -- please, use 
bzrtools' one as example and `bzr add` it to your trees.

Thank you.

P.S.: Ian, may be we need to write some concrete guidelines to plugins 
writers about packaging and publishing their plugins? What you think 
about? Today only a few of them is good packaged and have valid 
setup.py. Others is just a pain for end users to install. *Even* on 
Linux. *IMO*.




More information about the bazaar mailing list