[PATCH 1 of 2 RFC] setup: add command to generate index of extensions
Martin Geisler
mg at aragost.com
Sat Jun 4 11:05:50 CDT 2011
Yuya Nishihara <yuya at tcha.org> writes:
> +class buildhgextindex(Command):
> + description = 'generate prebuilt index of hgext (for frozen package)'
> + user_options = []
> + _indexfilename = 'hgext/__index__.py'
> +
> + def initialize_options(self):
> + pass
> +
> + def finalize_options(self):
> + pass
> +
> + def run(self):
> + if os.path.exists(self._indexfilename):
> + os.unlink(self._indexfilename)
> +
> + # here no extension enabled, disabled() lists up everything
> + code = ('import pprint; from mercurial import extensions; '
> + 'pprint.pprint(extensions.disabled())')
> + out, err = runcmd([sys.executable, '-c', code], env)
Is there a reason that you don't just run the Python code in the Python
process that runs setup.py?
--
Martin Geisler
aragost Trifork
Professional Mercurial support
http://mercurial.aragost.com/kick-start/
More information about the Mercurial-devel
mailing list