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