mercurial spec broken

Martin Geisler mg at lazybytes.net
Mon Dec 7 03:12:28 CST 2009


Gilles Moris <gilles.moris at free.fr> writes:

> Hi Guys,
>
> The contrib/mercurial.spec file has been broken by the rename of
> bash/zsh completion scripts. This can be fixed but ...
>
> As they are now handled by setup.py, they are by default already in
> the RPM with a separate path:

> /usr/share/bash_completion.d/hg
> /usr/share/zsh/site-functions/_hg
>
> when they were previously in:
> /etc/bash_completion.d/mercurial.sh
> /usr/share/zsh/site-functions/_mercurial
>
> So how do you see it:
> - rename the files again and change the setup.py again to match the
>   spec file
> - have them on both locations
> - get rid of the previous location but break compatibility
> - other / hybrid solution

Well, I talked about it with Mads yesterday, and the more I look at it,
the more it seems to me that we should not let setup.py install such
things. It just seems like there are too many special cases for us to
know them all in a single setup.py.

I'm almost at the point where I would say that we should

* let setup.py build the C extensions
* install them and the Python files

That's it... a very thin setup.py file which is mostly used for what it
does best: build C extensions. So users will have to use the Makefile to
build man pages and to compile the translations.

I hope distributions can then call setup.py with the right options to
make it install the Python modules in the right location.

Mads and I noticed yesterday that the Debian package is patching
Mercurial so that the templates are in

  /usr/share/mercurial/templates

instead of

  PREFIX/lib/site-packages/mercurial/templates

Should we try to support this upstream? I've CC'ed the Debian package
maintainers -- please talk to us about such changes. What can we do to
make your life easier?

-- 
Martin Geisler

VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/.


More information about the Mercurial-devel mailing list