[PATCH 1 of 7] setup: install translation files as package data

Dan Villiom Podlaski Christiansen danchr at gmail.com
Tue Dec 1 14:33:11 CST 2009


# HG changeset patch
# User Dan Villiom Podlaski Christiansen <danchr at gmail.com>
# Date 1259679970 -3600
# Node ID 29d52513a5300b2f555c77d7cd33ec9a8b01b8b1
# Parent  f3f301b30e6a56748fdade616dbefd4e4b9575d5
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.

To simplify the functionality of this change, the top-level `doc' and
`templates' directories have been moved into the `mercurial' package
directory.

diff --git a/help/config.txt b/mercurial/help/config.txt
rename from help/config.txt
rename to mercurial/help/config.txt
diff --git a/help/dates.txt b/mercurial/help/dates.txt
rename from help/dates.txt
rename to mercurial/help/dates.txt
diff --git a/help/diffs.txt b/mercurial/help/diffs.txt
rename from help/diffs.txt
rename to mercurial/help/diffs.txt
diff --git a/help/environment.txt b/mercurial/help/environment.txt
rename from help/environment.txt
rename to mercurial/help/environment.txt
diff --git a/help/extensions.txt b/mercurial/help/extensions.txt
rename from help/extensions.txt
rename to mercurial/help/extensions.txt
diff --git a/help/multirevs.txt b/mercurial/help/multirevs.txt
rename from help/multirevs.txt
rename to mercurial/help/multirevs.txt
diff --git a/help/patterns.txt b/mercurial/help/patterns.txt
rename from help/patterns.txt
rename to mercurial/help/patterns.txt
diff --git a/help/revisions.txt b/mercurial/help/revisions.txt
rename from help/revisions.txt
rename to mercurial/help/revisions.txt
diff --git a/help/templates.txt b/mercurial/help/templates.txt
rename from help/templates.txt
rename to mercurial/help/templates.txt
diff --git a/help/urls.txt b/mercurial/help/urls.txt
rename from help/urls.txt
rename to mercurial/help/urls.txt
diff --git a/templates/atom/changelog.tmpl b/mercurial/templates/atom/changelog.tmpl
rename from templates/atom/changelog.tmpl
rename to mercurial/templates/atom/changelog.tmpl
diff --git a/templates/atom/changelogentry.tmpl b/mercurial/templates/atom/changelogentry.tmpl
rename from templates/atom/changelogentry.tmpl
rename to mercurial/templates/atom/changelogentry.tmpl
diff --git a/templates/atom/error.tmpl b/mercurial/templates/atom/error.tmpl
rename from templates/atom/error.tmpl
rename to mercurial/templates/atom/error.tmpl
diff --git a/templates/atom/filelog.tmpl b/mercurial/templates/atom/filelog.tmpl
rename from templates/atom/filelog.tmpl
rename to mercurial/templates/atom/filelog.tmpl
diff --git a/templates/atom/header.tmpl b/mercurial/templates/atom/header.tmpl
rename from templates/atom/header.tmpl
rename to mercurial/templates/atom/header.tmpl
diff --git a/templates/atom/map b/mercurial/templates/atom/map
rename from templates/atom/map
rename to mercurial/templates/atom/map
diff --git a/templates/atom/tagentry.tmpl b/mercurial/templates/atom/tagentry.tmpl
rename from templates/atom/tagentry.tmpl
rename to mercurial/templates/atom/tagentry.tmpl
diff --git a/templates/atom/tags.tmpl b/mercurial/templates/atom/tags.tmpl
rename from templates/atom/tags.tmpl
rename to mercurial/templates/atom/tags.tmpl
diff --git a/templates/coal/header.tmpl b/mercurial/templates/coal/header.tmpl
rename from templates/coal/header.tmpl
rename to mercurial/templates/coal/header.tmpl
diff --git a/templates/coal/map b/mercurial/templates/coal/map
rename from templates/coal/map
rename to mercurial/templates/coal/map
diff --git a/templates/gitweb/branches.tmpl b/mercurial/templates/gitweb/branches.tmpl
rename from templates/gitweb/branches.tmpl
rename to mercurial/templates/gitweb/branches.tmpl
diff --git a/templates/gitweb/changelog.tmpl b/mercurial/templates/gitweb/changelog.tmpl
rename from templates/gitweb/changelog.tmpl
rename to mercurial/templates/gitweb/changelog.tmpl
diff --git a/templates/gitweb/changelogentry.tmpl b/mercurial/templates/gitweb/changelogentry.tmpl
rename from templates/gitweb/changelogentry.tmpl
rename to mercurial/templates/gitweb/changelogentry.tmpl
diff --git a/templates/gitweb/changeset.tmpl b/mercurial/templates/gitweb/changeset.tmpl
rename from templates/gitweb/changeset.tmpl
rename to mercurial/templates/gitweb/changeset.tmpl
diff --git a/templates/gitweb/error.tmpl b/mercurial/templates/gitweb/error.tmpl
rename from templates/gitweb/error.tmpl
rename to mercurial/templates/gitweb/error.tmpl
diff --git a/templates/gitweb/fileannotate.tmpl b/mercurial/templates/gitweb/fileannotate.tmpl
rename from templates/gitweb/fileannotate.tmpl
rename to mercurial/templates/gitweb/fileannotate.tmpl
diff --git a/templates/gitweb/filediff.tmpl b/mercurial/templates/gitweb/filediff.tmpl
rename from templates/gitweb/filediff.tmpl
rename to mercurial/templates/gitweb/filediff.tmpl
diff --git a/templates/gitweb/filelog.tmpl b/mercurial/templates/gitweb/filelog.tmpl
rename from templates/gitweb/filelog.tmpl
rename to mercurial/templates/gitweb/filelog.tmpl
diff --git a/templates/gitweb/filerevision.tmpl b/mercurial/templates/gitweb/filerevision.tmpl
rename from templates/gitweb/filerevision.tmpl
rename to mercurial/templates/gitweb/filerevision.tmpl
diff --git a/templates/gitweb/footer.tmpl b/mercurial/templates/gitweb/footer.tmpl
rename from templates/gitweb/footer.tmpl
rename to mercurial/templates/gitweb/footer.tmpl
diff --git a/templates/gitweb/graph.tmpl b/mercurial/templates/gitweb/graph.tmpl
rename from templates/gitweb/graph.tmpl
rename to mercurial/templates/gitweb/graph.tmpl
diff --git a/templates/gitweb/header.tmpl b/mercurial/templates/gitweb/header.tmpl
rename from templates/gitweb/header.tmpl
rename to mercurial/templates/gitweb/header.tmpl
diff --git a/templates/gitweb/index.tmpl b/mercurial/templates/gitweb/index.tmpl
rename from templates/gitweb/index.tmpl
rename to mercurial/templates/gitweb/index.tmpl
diff --git a/templates/gitweb/manifest.tmpl b/mercurial/templates/gitweb/manifest.tmpl
rename from templates/gitweb/manifest.tmpl
rename to mercurial/templates/gitweb/manifest.tmpl
diff --git a/templates/gitweb/map b/mercurial/templates/gitweb/map
rename from templates/gitweb/map
rename to mercurial/templates/gitweb/map
diff --git a/templates/gitweb/notfound.tmpl b/mercurial/templates/gitweb/notfound.tmpl
rename from templates/gitweb/notfound.tmpl
rename to mercurial/templates/gitweb/notfound.tmpl
diff --git a/templates/gitweb/search.tmpl b/mercurial/templates/gitweb/search.tmpl
rename from templates/gitweb/search.tmpl
rename to mercurial/templates/gitweb/search.tmpl
diff --git a/templates/gitweb/shortlog.tmpl b/mercurial/templates/gitweb/shortlog.tmpl
rename from templates/gitweb/shortlog.tmpl
rename to mercurial/templates/gitweb/shortlog.tmpl
diff --git a/templates/gitweb/summary.tmpl b/mercurial/templates/gitweb/summary.tmpl
rename from templates/gitweb/summary.tmpl
rename to mercurial/templates/gitweb/summary.tmpl
diff --git a/templates/gitweb/tags.tmpl b/mercurial/templates/gitweb/tags.tmpl
rename from templates/gitweb/tags.tmpl
rename to mercurial/templates/gitweb/tags.tmpl
diff --git a/templates/map-cmdline.changelog b/mercurial/templates/map-cmdline.changelog
rename from templates/map-cmdline.changelog
rename to mercurial/templates/map-cmdline.changelog
diff --git a/templates/map-cmdline.compact b/mercurial/templates/map-cmdline.compact
rename from templates/map-cmdline.compact
rename to mercurial/templates/map-cmdline.compact
diff --git a/templates/map-cmdline.default b/mercurial/templates/map-cmdline.default
rename from templates/map-cmdline.default
rename to mercurial/templates/map-cmdline.default
diff --git a/templates/monoblue/branches.tmpl b/mercurial/templates/monoblue/branches.tmpl
rename from templates/monoblue/branches.tmpl
rename to mercurial/templates/monoblue/branches.tmpl
diff --git a/templates/monoblue/changelog.tmpl b/mercurial/templates/monoblue/changelog.tmpl
rename from templates/monoblue/changelog.tmpl
rename to mercurial/templates/monoblue/changelog.tmpl
diff --git a/templates/monoblue/changelogentry.tmpl b/mercurial/templates/monoblue/changelogentry.tmpl
rename from templates/monoblue/changelogentry.tmpl
rename to mercurial/templates/monoblue/changelogentry.tmpl
diff --git a/templates/monoblue/changeset.tmpl b/mercurial/templates/monoblue/changeset.tmpl
rename from templates/monoblue/changeset.tmpl
rename to mercurial/templates/monoblue/changeset.tmpl
diff --git a/templates/monoblue/error.tmpl b/mercurial/templates/monoblue/error.tmpl
rename from templates/monoblue/error.tmpl
rename to mercurial/templates/monoblue/error.tmpl
diff --git a/templates/monoblue/fileannotate.tmpl b/mercurial/templates/monoblue/fileannotate.tmpl
rename from templates/monoblue/fileannotate.tmpl
rename to mercurial/templates/monoblue/fileannotate.tmpl
diff --git a/templates/monoblue/filediff.tmpl b/mercurial/templates/monoblue/filediff.tmpl
rename from templates/monoblue/filediff.tmpl
rename to mercurial/templates/monoblue/filediff.tmpl
diff --git a/templates/monoblue/filelog.tmpl b/mercurial/templates/monoblue/filelog.tmpl
rename from templates/monoblue/filelog.tmpl
rename to mercurial/templates/monoblue/filelog.tmpl
diff --git a/templates/monoblue/filerevision.tmpl b/mercurial/templates/monoblue/filerevision.tmpl
rename from templates/monoblue/filerevision.tmpl
rename to mercurial/templates/monoblue/filerevision.tmpl
diff --git a/templates/monoblue/footer.tmpl b/mercurial/templates/monoblue/footer.tmpl
rename from templates/monoblue/footer.tmpl
rename to mercurial/templates/monoblue/footer.tmpl
diff --git a/templates/monoblue/graph.tmpl b/mercurial/templates/monoblue/graph.tmpl
rename from templates/monoblue/graph.tmpl
rename to mercurial/templates/monoblue/graph.tmpl
diff --git a/templates/monoblue/header.tmpl b/mercurial/templates/monoblue/header.tmpl
rename from templates/monoblue/header.tmpl
rename to mercurial/templates/monoblue/header.tmpl
diff --git a/templates/monoblue/index.tmpl b/mercurial/templates/monoblue/index.tmpl
rename from templates/monoblue/index.tmpl
rename to mercurial/templates/monoblue/index.tmpl
diff --git a/templates/monoblue/manifest.tmpl b/mercurial/templates/monoblue/manifest.tmpl
rename from templates/monoblue/manifest.tmpl
rename to mercurial/templates/monoblue/manifest.tmpl
diff --git a/templates/monoblue/map b/mercurial/templates/monoblue/map
rename from templates/monoblue/map
rename to mercurial/templates/monoblue/map
diff --git a/templates/monoblue/notfound.tmpl b/mercurial/templates/monoblue/notfound.tmpl
rename from templates/monoblue/notfound.tmpl
rename to mercurial/templates/monoblue/notfound.tmpl
diff --git a/templates/monoblue/search.tmpl b/mercurial/templates/monoblue/search.tmpl
rename from templates/monoblue/search.tmpl
rename to mercurial/templates/monoblue/search.tmpl
diff --git a/templates/monoblue/shortlog.tmpl b/mercurial/templates/monoblue/shortlog.tmpl
rename from templates/monoblue/shortlog.tmpl
rename to mercurial/templates/monoblue/shortlog.tmpl
diff --git a/templates/monoblue/summary.tmpl b/mercurial/templates/monoblue/summary.tmpl
rename from templates/monoblue/summary.tmpl
rename to mercurial/templates/monoblue/summary.tmpl
diff --git a/templates/monoblue/tags.tmpl b/mercurial/templates/monoblue/tags.tmpl
rename from templates/monoblue/tags.tmpl
rename to mercurial/templates/monoblue/tags.tmpl
diff --git a/templates/paper/branches.tmpl b/mercurial/templates/paper/branches.tmpl
rename from templates/paper/branches.tmpl
rename to mercurial/templates/paper/branches.tmpl
diff --git a/templates/paper/changeset.tmpl b/mercurial/templates/paper/changeset.tmpl
rename from templates/paper/changeset.tmpl
rename to mercurial/templates/paper/changeset.tmpl
diff --git a/templates/paper/error.tmpl b/mercurial/templates/paper/error.tmpl
rename from templates/paper/error.tmpl
rename to mercurial/templates/paper/error.tmpl
diff --git a/templates/paper/fileannotate.tmpl b/mercurial/templates/paper/fileannotate.tmpl
rename from templates/paper/fileannotate.tmpl
rename to mercurial/templates/paper/fileannotate.tmpl
diff --git a/templates/paper/filediff.tmpl b/mercurial/templates/paper/filediff.tmpl
rename from templates/paper/filediff.tmpl
rename to mercurial/templates/paper/filediff.tmpl
diff --git a/templates/paper/filelog.tmpl b/mercurial/templates/paper/filelog.tmpl
rename from templates/paper/filelog.tmpl
rename to mercurial/templates/paper/filelog.tmpl
diff --git a/templates/paper/filelogentry.tmpl b/mercurial/templates/paper/filelogentry.tmpl
rename from templates/paper/filelogentry.tmpl
rename to mercurial/templates/paper/filelogentry.tmpl
diff --git a/templates/paper/filerevision.tmpl b/mercurial/templates/paper/filerevision.tmpl
rename from templates/paper/filerevision.tmpl
rename to mercurial/templates/paper/filerevision.tmpl
diff --git a/templates/paper/footer.tmpl b/mercurial/templates/paper/footer.tmpl
rename from templates/paper/footer.tmpl
rename to mercurial/templates/paper/footer.tmpl
diff --git a/templates/paper/graph.tmpl b/mercurial/templates/paper/graph.tmpl
rename from templates/paper/graph.tmpl
rename to mercurial/templates/paper/graph.tmpl
diff --git a/templates/paper/header.tmpl b/mercurial/templates/paper/header.tmpl
rename from templates/paper/header.tmpl
rename to mercurial/templates/paper/header.tmpl
diff --git a/templates/paper/index.tmpl b/mercurial/templates/paper/index.tmpl
rename from templates/paper/index.tmpl
rename to mercurial/templates/paper/index.tmpl
diff --git a/templates/paper/manifest.tmpl b/mercurial/templates/paper/manifest.tmpl
rename from templates/paper/manifest.tmpl
rename to mercurial/templates/paper/manifest.tmpl
diff --git a/templates/paper/map b/mercurial/templates/paper/map
rename from templates/paper/map
rename to mercurial/templates/paper/map
diff --git a/templates/paper/notfound.tmpl b/mercurial/templates/paper/notfound.tmpl
rename from templates/paper/notfound.tmpl
rename to mercurial/templates/paper/notfound.tmpl
diff --git a/templates/paper/search.tmpl b/mercurial/templates/paper/search.tmpl
rename from templates/paper/search.tmpl
rename to mercurial/templates/paper/search.tmpl
diff --git a/templates/paper/shortlog.tmpl b/mercurial/templates/paper/shortlog.tmpl
rename from templates/paper/shortlog.tmpl
rename to mercurial/templates/paper/shortlog.tmpl
diff --git a/templates/paper/shortlogentry.tmpl b/mercurial/templates/paper/shortlogentry.tmpl
rename from templates/paper/shortlogentry.tmpl
rename to mercurial/templates/paper/shortlogentry.tmpl
diff --git a/templates/paper/tags.tmpl b/mercurial/templates/paper/tags.tmpl
rename from templates/paper/tags.tmpl
rename to mercurial/templates/paper/tags.tmpl
diff --git a/templates/raw/changeset.tmpl b/mercurial/templates/raw/changeset.tmpl
rename from templates/raw/changeset.tmpl
rename to mercurial/templates/raw/changeset.tmpl
diff --git a/templates/raw/error.tmpl b/mercurial/templates/raw/error.tmpl
rename from templates/raw/error.tmpl
rename to mercurial/templates/raw/error.tmpl
diff --git a/templates/raw/fileannotate.tmpl b/mercurial/templates/raw/fileannotate.tmpl
rename from templates/raw/fileannotate.tmpl
rename to mercurial/templates/raw/fileannotate.tmpl
diff --git a/templates/raw/filediff.tmpl b/mercurial/templates/raw/filediff.tmpl
rename from templates/raw/filediff.tmpl
rename to mercurial/templates/raw/filediff.tmpl
diff --git a/templates/raw/index.tmpl b/mercurial/templates/raw/index.tmpl
rename from templates/raw/index.tmpl
rename to mercurial/templates/raw/index.tmpl
diff --git a/templates/raw/manifest.tmpl b/mercurial/templates/raw/manifest.tmpl
rename from templates/raw/manifest.tmpl
rename to mercurial/templates/raw/manifest.tmpl
diff --git a/templates/raw/map b/mercurial/templates/raw/map
rename from templates/raw/map
rename to mercurial/templates/raw/map
diff --git a/templates/raw/notfound.tmpl b/mercurial/templates/raw/notfound.tmpl
rename from templates/raw/notfound.tmpl
rename to mercurial/templates/raw/notfound.tmpl
diff --git a/templates/rss/changelog.tmpl b/mercurial/templates/rss/changelog.tmpl
rename from templates/rss/changelog.tmpl
rename to mercurial/templates/rss/changelog.tmpl
diff --git a/templates/rss/changelogentry.tmpl b/mercurial/templates/rss/changelogentry.tmpl
rename from templates/rss/changelogentry.tmpl
rename to mercurial/templates/rss/changelogentry.tmpl
diff --git a/templates/rss/error.tmpl b/mercurial/templates/rss/error.tmpl
rename from templates/rss/error.tmpl
rename to mercurial/templates/rss/error.tmpl
diff --git a/templates/rss/filelog.tmpl b/mercurial/templates/rss/filelog.tmpl
rename from templates/rss/filelog.tmpl
rename to mercurial/templates/rss/filelog.tmpl
diff --git a/templates/rss/filelogentry.tmpl b/mercurial/templates/rss/filelogentry.tmpl
rename from templates/rss/filelogentry.tmpl
rename to mercurial/templates/rss/filelogentry.tmpl
diff --git a/templates/rss/header.tmpl b/mercurial/templates/rss/header.tmpl
rename from templates/rss/header.tmpl
rename to mercurial/templates/rss/header.tmpl
diff --git a/templates/rss/map b/mercurial/templates/rss/map
rename from templates/rss/map
rename to mercurial/templates/rss/map
diff --git a/templates/rss/tagentry.tmpl b/mercurial/templates/rss/tagentry.tmpl
rename from templates/rss/tagentry.tmpl
rename to mercurial/templates/rss/tagentry.tmpl
diff --git a/templates/rss/tags.tmpl b/mercurial/templates/rss/tags.tmpl
rename from templates/rss/tags.tmpl
rename to mercurial/templates/rss/tags.tmpl
diff --git a/templates/spartan/branches.tmpl b/mercurial/templates/spartan/branches.tmpl
rename from templates/spartan/branches.tmpl
rename to mercurial/templates/spartan/branches.tmpl
diff --git a/templates/spartan/changelog.tmpl b/mercurial/templates/spartan/changelog.tmpl
rename from templates/spartan/changelog.tmpl
rename to mercurial/templates/spartan/changelog.tmpl
diff --git a/templates/spartan/changelogentry.tmpl b/mercurial/templates/spartan/changelogentry.tmpl
rename from templates/spartan/changelogentry.tmpl
rename to mercurial/templates/spartan/changelogentry.tmpl
diff --git a/templates/spartan/changeset.tmpl b/mercurial/templates/spartan/changeset.tmpl
rename from templates/spartan/changeset.tmpl
rename to mercurial/templates/spartan/changeset.tmpl
diff --git a/templates/spartan/error.tmpl b/mercurial/templates/spartan/error.tmpl
rename from templates/spartan/error.tmpl
rename to mercurial/templates/spartan/error.tmpl
diff --git a/templates/spartan/fileannotate.tmpl b/mercurial/templates/spartan/fileannotate.tmpl
rename from templates/spartan/fileannotate.tmpl
rename to mercurial/templates/spartan/fileannotate.tmpl
diff --git a/templates/spartan/filediff.tmpl b/mercurial/templates/spartan/filediff.tmpl
rename from templates/spartan/filediff.tmpl
rename to mercurial/templates/spartan/filediff.tmpl
diff --git a/templates/spartan/filelog.tmpl b/mercurial/templates/spartan/filelog.tmpl
rename from templates/spartan/filelog.tmpl
rename to mercurial/templates/spartan/filelog.tmpl
diff --git a/templates/spartan/filelogentry.tmpl b/mercurial/templates/spartan/filelogentry.tmpl
rename from templates/spartan/filelogentry.tmpl
rename to mercurial/templates/spartan/filelogentry.tmpl
diff --git a/templates/spartan/filerevision.tmpl b/mercurial/templates/spartan/filerevision.tmpl
rename from templates/spartan/filerevision.tmpl
rename to mercurial/templates/spartan/filerevision.tmpl
diff --git a/templates/spartan/footer.tmpl b/mercurial/templates/spartan/footer.tmpl
rename from templates/spartan/footer.tmpl
rename to mercurial/templates/spartan/footer.tmpl
diff --git a/templates/spartan/graph.tmpl b/mercurial/templates/spartan/graph.tmpl
rename from templates/spartan/graph.tmpl
rename to mercurial/templates/spartan/graph.tmpl
diff --git a/templates/spartan/header.tmpl b/mercurial/templates/spartan/header.tmpl
rename from templates/spartan/header.tmpl
rename to mercurial/templates/spartan/header.tmpl
diff --git a/templates/spartan/index.tmpl b/mercurial/templates/spartan/index.tmpl
rename from templates/spartan/index.tmpl
rename to mercurial/templates/spartan/index.tmpl
diff --git a/templates/spartan/manifest.tmpl b/mercurial/templates/spartan/manifest.tmpl
rename from templates/spartan/manifest.tmpl
rename to mercurial/templates/spartan/manifest.tmpl
diff --git a/templates/spartan/map b/mercurial/templates/spartan/map
rename from templates/spartan/map
rename to mercurial/templates/spartan/map
diff --git a/templates/spartan/notfound.tmpl b/mercurial/templates/spartan/notfound.tmpl
rename from templates/spartan/notfound.tmpl
rename to mercurial/templates/spartan/notfound.tmpl
diff --git a/templates/spartan/search.tmpl b/mercurial/templates/spartan/search.tmpl
rename from templates/spartan/search.tmpl
rename to mercurial/templates/spartan/search.tmpl
diff --git a/templates/spartan/shortlog.tmpl b/mercurial/templates/spartan/shortlog.tmpl
rename from templates/spartan/shortlog.tmpl
rename to mercurial/templates/spartan/shortlog.tmpl
diff --git a/templates/spartan/shortlogentry.tmpl b/mercurial/templates/spartan/shortlogentry.tmpl
rename from templates/spartan/shortlogentry.tmpl
rename to mercurial/templates/spartan/shortlogentry.tmpl
diff --git a/templates/spartan/tags.tmpl b/mercurial/templates/spartan/tags.tmpl
rename from templates/spartan/tags.tmpl
rename to mercurial/templates/spartan/tags.tmpl
diff --git a/templates/static/background.png b/mercurial/templates/static/background.png
rename from templates/static/background.png
rename to mercurial/templates/static/background.png
diff --git a/templates/static/coal-file.png b/mercurial/templates/static/coal-file.png
rename from templates/static/coal-file.png
rename to mercurial/templates/static/coal-file.png
diff --git a/templates/static/coal-folder.png b/mercurial/templates/static/coal-folder.png
rename from templates/static/coal-folder.png
rename to mercurial/templates/static/coal-folder.png
diff --git a/templates/static/excanvas.js b/mercurial/templates/static/excanvas.js
rename from templates/static/excanvas.js
rename to mercurial/templates/static/excanvas.js
diff --git a/templates/static/graph.js b/mercurial/templates/static/graph.js
rename from templates/static/graph.js
rename to mercurial/templates/static/graph.js
diff --git a/templates/static/hgicon.png b/mercurial/templates/static/hgicon.png
rename from templates/static/hgicon.png
rename to mercurial/templates/static/hgicon.png
diff --git a/templates/static/hglogo.png b/mercurial/templates/static/hglogo.png
rename from templates/static/hglogo.png
rename to mercurial/templates/static/hglogo.png
diff --git a/templates/static/style-coal.css b/mercurial/templates/static/style-coal.css
rename from templates/static/style-coal.css
rename to mercurial/templates/static/style-coal.css
diff --git a/templates/static/style-gitweb.css b/mercurial/templates/static/style-gitweb.css
rename from templates/static/style-gitweb.css
rename to mercurial/templates/static/style-gitweb.css
diff --git a/templates/static/style-monoblue.css b/mercurial/templates/static/style-monoblue.css
rename from templates/static/style-monoblue.css
rename to mercurial/templates/static/style-monoblue.css
diff --git a/templates/static/style-paper.css b/mercurial/templates/static/style-paper.css
rename from templates/static/style-paper.css
rename to mercurial/templates/static/style-paper.css
diff --git a/templates/static/style.css b/mercurial/templates/static/style.css
rename from templates/static/style.css
rename to mercurial/templates/static/style.css
diff --git a/templates/template-vars.txt b/mercurial/templates/template-vars.txt
rename from templates/template-vars.txt
rename to mercurial/templates/template-vars.txt
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -165,12 +165,6 @@ try:
 except ImportError:
     version = 'unknown'
 
-class install_package_data(install_data):
-    def finalize_options(self):
-        self.set_undefined_options('install',
-                                   ('install_lib', 'install_dir'))
-        install_data.finalize_options(self)
-
 class build_mo(build):
 
     description = "build translations (.mo files)"
@@ -182,6 +176,8 @@ class build_mo(build):
             return
 
         podir = 'i18n'
+        datafiles = self.distribution.package_data['mercurial']
+
         if not os.path.isdir(podir):
             self.warn("could not find %s/ directory" % podir)
             return
@@ -193,14 +189,14 @@ class build_mo(build):
             pofile = join(podir, po)
             modir = join('locale', po[:-3], 'LC_MESSAGES')
             mofile = join(modir, 'hg.mo')
-            cmd = ['msgfmt', '-v', '-o', mofile, pofile]
+            mobuildfile = join('mercurial', mofile)
+            cmd = ['msgfmt', '-v', '-o', mobuildfile, pofile]
             if sys.platform != 'sunos5':
                 # msgfmt on Solaris does not know about -c
                 cmd.append('-c')
-            self.mkpath(modir)
-            self.make_file([pofile], mofile, spawn, (cmd,))
-            self.distribution.data_files.append((join('mercurial', modir),
-                                                 [mofile]))
+            self.mkpath(join('mercurial', modir))
+            self.make_file([pofile], mobuildfile, spawn, (cmd,))
+            datafiles.append(mofile)
 
 build.sub_commands.append(('build_mo', None))
 
@@ -230,8 +226,7 @@ class hg_build_py(build_py):
             else:
                 yield module
 
-cmdclass = {'install_data': install_package_data,
-            'build_mo': build_mo,
+cmdclass = {'build_mo': build_mo,
             'build_py': hg_build_py}
 
 ext_modules=[
@@ -255,13 +250,20 @@ if sys.platform == 'linux2' and os.uname
                                      ['hgext/inotify/linux/_inotify.c']))
         packages.extend(['hgext.inotify', 'hgext.inotify.linux'])
 
+package_data = {}
+
+def _unignored(p):
+    return p and p[0] != '.' and p[-1] != '~'
+
+for root in ('templates', 'help'):
+    for dir, dirs, files in os.walk(os.path.join('mercurial', root)):
+        dir = dir[len('mercurial') + len(os.sep):]
+        dirs[:] = filter(_unignored, dirs)
+        for f in filter(_unignored, files):
+            f = os.path.join(dir, f)
+            package_data.setdefault('mercurial', []).append(f)
+
 datafiles = []
-for root in ('templates', 'i18n', 'help'):
-    for dir, dirs, files in os.walk(root):
-        dirs[:] = [x for x in dirs if not x.startswith('.')]
-        files = [x for x in files if not x.startswith('.')]
-        datafiles.append((os.path.join('mercurial', dir),
-                          [os.path.join(dir, file_) for file_ in files]))
 
 setup(name='mercurial',
       version=version,
@@ -274,6 +276,7 @@ setup(name='mercurial',
       packages=packages,
       ext_modules=ext_modules,
       data_files=datafiles,
+      package_data=package_data,
       cmdclass=cmdclass,
       options=dict(py2exe=dict(packages=['hgext', 'email']),
                    bdist_mpkg=dict(zipdist=True,


More information about the Mercurial-devel mailing list