[PATCH 0 of 6] Build documentation using distutils - v3
Dan Villiom Podlaski Christiansen
danchr at gmail.com
Thu Nov 26 13:48:01 CST 2009
This is an updated version of my distutils-docutils-marriage
patch. The primary changes are:
* The package data is now installed as actual package data instead of
regular data.
* Both documentation & manual locations are fully customisable, and
the values may refer to distutils configuration variables.
* The RPM build specification has been updated to use distutils
exclusively. In theory, it works; I haven't been able to test it.
* The HTML documentation no longer includes the manual category in the
filenames.
* Commit messages are much more elaborate.
Please test this with your workflow and/or any use-cases & scenarios
you can think of! I may have broken some of them...
A comparison of the files distutils installs before and after my patch
series:
--- original 2009-11-26 20:47:13.000000000 +0100
+++ patched 2009-11-26 20:47:41.000000000 +0100
@@ -159,3 +159,18 @@
lib/python2.4/site-packages/mercurial/templates/static/style-paper.css
lib/python2.4/site-packages/mercurial/templates/static/style.css
lib/python2.4/site-packages/mercurial/templates/template-vars.txt
+share/bash_completion.d/hg
+share/doc/mercurial/hg.html
+share/doc/mercurial/hgignore.html
+share/doc/mercurial/hgrc.html
+share/doc/mercurial/style.css
+share/man/man1/hg.1
+share/man/man5/hgignore.5
+share/man/man5/hgrc.5
+share/mercurial/examples/mergetools.hgrc
+share/mercurial/examples/sample.hgrc
+share/mercurial/www/hgweb.cgi
+share/mercurial/www/hgwebdir.cgi
+share/mercurial/www/hgwebdir.fcgi
+share/mercurial/www/hgwebdir.wsgi
+share/zsh/site-functions/_hg
2009-11-26 Dan Villiom Podlaski Christiansen <danchr at gmail.com>
* setup.py:
setup: install translation files as package data.
Remove the `install_package_data' subclass of `install_data' and use
the `package_data' functionality provided by distutils instead. As
package data must be located within the package directory, the data
files are now generated in the build directory.
[10bbfffbd337] [install-package-data.diff]
2009-11-26 Dan Villiom Podlaski Christiansen <danchr at gmail.com>
* setup.py:
setup: expand configuration variables in data paths.
Subclass the `install_data' in order to allow paths to installed
data to refer to configuration variables such as $dist_name or
$dist_version. This is primarily useful for distributors.
Please note that this changeset doesn't actually *use* the new
functionality; it merely introduces the infrastructure.
[aaed59f0dc70] [install-dirs.diff]
2009-11-26 Dan Villiom Podlaski Christiansen <danchr at gmail.com>
* setup.py:
setup: add missing `share' directory to install_data on UNIX
platforms.
Technically, this is a hack; we modify a "constant" in distutils.
However, `install_data' incorrectly defaults to e.g. "$base" in the
`unix_home' and `unix_prefix' schemes, rather than the proper
"$base/share", so we fix it. The paths will not be modified if they
contain a `/' as it would indicate that the bug was fixed.
[3aeda8897d6e] [install-data-dir.diff]
2009-11-26 Dan Villiom Podlaski Christiansen <danchr at gmail.com>
* contrib/bash/hg, contrib/bash_completion, contrib/zsh/_hg,
contrib/zsh_completion, setup.py:
setup: install some useful data files.
The selection is somewhat arbitrary. In the case of the Zsh
completion file, it will not conflict with the builtin Zsh
completions: they are in a file named `_mercurial', not `_hg'.
[27a452aa1d0a] [install-data.diff]
2009-11-26 Dan Villiom Podlaski Christiansen <danchr at gmail.com>
* Makefile, contrib/mercurial.spec, doc/Makefile, doc/__init__.py,
doc/manpage.py, doc/rst2man.py, setup.py:
setup: generate, build & install documentation using distutils &
docutils.
- Add a new dedicated build stage for generating & installing the
documentation. Unfortunately, this stage is somewhat complex. The
motivation for this change is described in the source docstrings in
setup.py.
- Turn the `doc' directory into a package by adding an empty
__init__.py file.
- Remove the Makefile in `doc', as it is now redundant, and strip
out references to it from the top-level Makefile.
- Remove references the `doc' Makefile from the RPM build
specification. Instead, pass --install-man and --install-doc to the
distutils build. (The latter differs from the Mercurial default by
adding the version.) Please note that the build specification
remains untested.
[912874aa86b1] [install-documentation.diff]
2009-11-26 Dan Villiom Podlaski Christiansen <danchr at gmail.com>
* setup.py:
setup: build the documentation in a subdirectory of `build_temp'.
[bc0da94c5ddc] [install-data-temp.diff]
More information about the Mercurial-devel
mailing list