[Distutils] setuptools --tag-revision poposed feature

Tres Seaver tseaver at palladion.com
Sun May 2 19:06:32 CEST 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Manlio Perillo wrote:
> Hi.
> 
> Currently setuptools only support a ``tag-svn-revision`` option.
> However I use Mercurial, and I would like to tag hg revisions.
> 
> 
> Looking at setuptool sources, it should not hard to add a new
> ``tag-revision`` option, used, as an example:
> 
>   --tag-revision=hg
> 
> In egg_info command class, then, the tags method could do something like:
> 
>     def tags(self):
>         version = ''
>         if self.tag_build:
>             version+=self.tag_build
>         if self.tag_revision:
>             for ep in iter_entry_points(
>                 'setuptools.tag_revision', self.tag_revision):
>                 version += '-r%s' % ep.load()()
> 
>                 # Only use first entry point
>                 break
>         elif os.path.exists('PKG-INFO'):
>             version += '-r%s' % get_pkg_info_revision()
>         if self.tag_date:
>             import time; version += time.strftime("-%Y%m%d")
>         return version
> 
> 
> The current ``--tag-svn-revision`` will become an alias for
> ``--tag-revision=svn``, and support will be directly available in
> setuptools.
> 
> 
> 
> I don't know if setuptools is still under development (this topic seems
> quite confused, for me), but can I write a patch, hoping that it will be
> accepted?
> Where should I send the patch?

The setuptools tracker is for "generic" setuptools issues:

  http://bugs.python.org/setuptools/

Depending on the implementation, you might need to patch the plugin used
to get setuptools to recognize your "under versino control" files with
Mercurial, e.g.

  http://pypi.python.org/pypi/hg.setuptools

or:

  http://bitbucket.org/jezdez/setuptools_hg/wiki/Home



Tres.
- --
===================================================================
Tres Seaver          +1 540-429-0999          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkvdsRgACgkQ+gerLs4ltQ4M7QCeNCKXAGO9fX1qq8yFPfcma48e
750An16rdD9w5IPLzff0aIh/S6C2Js9y
=Ifs0
-----END PGP SIGNATURE-----



More information about the Distutils-SIG mailing list