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