Idioms for Modules
John Arbash Meinel
john at arbash-meinel.com
Tue Aug 25 17:45:30 BST 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Russel Winder wrote:
> Bazaar plugins are an excellent paradigm of how to use Python packages
> as "add ins" for a system. Easy to work with using Bazaar. However, a
> lot of systems use modules, not packages, as the unit of "add in".
>
> Is there an easy idiom of use for using Bazaar to do version control of
> modules rather than packages?
>
> Thanks.
What do you consider a module versus a package? You mean 'foo.py' versus
'foo/__init__.py' ?
As bzr versions a 'tree' and not individual files, I don't know that
there is a great answer.
Technically, bzr plugins can also be modules. It is just rarely ever
used because packages are more flexible, and integrate better with bzr
as a VCS.
(consider that at a minimum bzr needs a place to put its information
about the file, you can't really do that with a module, since it is
limited to a single file...)
So in general, no, there isn't an easy way to use bzr to version
single-file modules.
I suppose you could version them somewhere, and then symlink the single
module into the right location.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkqUFSkACgkQJdeBCYSNAAMOjQCfX2wsjU3Cym3+Z0UpnVEorm4Q
bI4AnR+hlFvE1KBOOPkpmMHpHD1die6p
=MNdR
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list