18b9e19
diff -ruN mercurial-0.9.4.orig/setup.py mercurial-0.9.4.new/setup.py
18b9e19
--- mercurial-0.9.4.orig/setup.py	2007-06-25 22:18:18.000000000 -0400
18b9e19
+++ mercurial-0.9.4.new/setup.py	2007-08-29 19:17:36.000000000 -0400
18b9e19
@@ -54,6 +54,21 @@
18b9e19
 mercurial.version.remember_version(version)
18b9e19
 cmdclass = {'install_data': install_package_data}
18b9e19
 
18b9e19
+# We want to install the contrib/ directory, but it isn't immediately
18b9e19
+# clear where to do that on some platforms. As a temporary expedient,
18b9e19
+# assemble that part of the setup manifest only if we are running on
18b9e19
+# a posix platform. This is no worse than the current state, and people
18b9e19
+# who understand the respective target platforms can improve it over
18b9e19
+# time.
18b9e19
+
18b9e19
+contrib_files = []  # default
18b9e19
+if os.name in ['posix']:
18b9e19
+    contrib_files = [(os.path.join('/usr/share/mercurial', root),
18b9e19
+                      [os.path.join(root, file_) for file_ in files])
18b9e19
+                     for root, dirs, files in os.walk('contrib')]
18b9e19
+    contrib_files = contrib_files + [('/usr/share/mercurial/contrib',
18b9e19
+                                      ['hgwebdir.cgi', 'hgweb.cgi'])]
18b9e19
+
18b9e19
 setup(name='mercurial',
18b9e19
       version=mercurial.version.get_version(),
18b9e19
       author='Matt Mackall',
18b9e19
@@ -67,7 +82,8 @@
18b9e19
                    Extension('mercurial.base85', ['mercurial/base85.c'])],
18b9e19
       data_files=[(os.path.join('mercurial', root),
18b9e19
                    [os.path.join(root, file_) for file_ in files])
18b9e19
-                  for root, dirs, files in os.walk('templates')],
18b9e19
+                  for root, dirs, files in os.walk('templates')] +
18b9e19
+                 contrib_files,
18b9e19
       cmdclass=cmdclass,
18b9e19
       scripts=['hg', 'hgmerge'],
18b9e19
       options=dict(py2exe=dict(packages=['hgext']),