Mercurial > hg
annotate doc/README @ 28450:155e3308289c
hgext: officially turn 'hgext' into a namespace package
Actually since Python 2.3, there is some way to turn top level package into
"namespace package" so that multiple subpackage installed in different part of
the path can still be imported transparently. This feature was previously
thought (at least by myself) to be only provided by some setuptool black magic.
Turning hgext into such namespace package allows third extensions to install
themselves inside the "hgext" namespace package to avoid polluting the global
python module namespace. They will now be able to do so without making it a pain
to use a Mercurial "installed" in a different way/location than these
extensions.
The only constrains is that the extension ship a 'hgext/__init__.py' containing
the same call to 'pkgutil.extend_path' and nothing else. This seems realistic.
The main question that remains is: should we introduce a dedicated namespace for
third party extension (hgext3rd?) to make a clearer distinction between what is
officially supported and what is not? If so, this will be introduced in a follow
up patch.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Sat, 27 Feb 2016 12:56:26 +0100 |
parents | 3516a4e877c1 |
children |
rev | line source |
---|---|
9172
bc1de09090bc
doc: update README with links to Docutils
Martin Geisler <mg@lazybytes.net>
parents:
5048
diff
changeset
|
1 Mercurial's documentation is kept in reStructuredText format, which is |
bc1de09090bc
doc: update README with links to Docutils
Martin Geisler <mg@lazybytes.net>
parents:
5048
diff
changeset
|
2 a simple plain text format that's easy to read and edit: |
177 | 3 |
9172
bc1de09090bc
doc: update README with links to Docutils
Martin Geisler <mg@lazybytes.net>
parents:
5048
diff
changeset
|
4 http://docutils.sourceforge.net/rst.html |
177 | 5 |
9172
bc1de09090bc
doc: update README with links to Docutils
Martin Geisler <mg@lazybytes.net>
parents:
5048
diff
changeset
|
6 It's also convertible to a variety of other formats including standard |
9419
3516a4e877c1
doc/README: simplify instructions
Martin Geisler <mg@lazybytes.net>
parents:
9406
diff
changeset
|
7 UNIX man page format and HTML. You'll need to install Docutils: |
177 | 8 |
9172
bc1de09090bc
doc: update README with links to Docutils
Martin Geisler <mg@lazybytes.net>
parents:
5048
diff
changeset
|
9 http://docutils.sourceforge.net/ |
177 | 10 |
9172
bc1de09090bc
doc: update README with links to Docutils
Martin Geisler <mg@lazybytes.net>
parents:
5048
diff
changeset
|
11 Use the Makefile in this directory to generate the man and HTML pages. |