From 55bd4e254f428dbc7acd8fec1988f0016551d5a1 Mon Sep 17 00:00:00 2001
From: david-sarah <david-sarah@jacaranda.org>
Date: Sun, 14 Nov 2010 11:35:58 -0800
Subject: [PATCH] misc/build_helpers/gen-package-table.py: put 'n/a' in table
 entries for pywin32 on non-Windows platforms. Also remove some dead code.
 refs #1247

---
 misc/build_helpers/gen-package-table.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/misc/build_helpers/gen-package-table.py b/misc/build_helpers/gen-package-table.py
index 23b5ee5f..505ecbf0 100644
--- a/misc/build_helpers/gen-package-table.py
+++ b/misc/build_helpers/gen-package-table.py
@@ -11,7 +11,6 @@ FILENAME_RE  = re.compile(r'([a-zA-Z_0-9\.]*)-([0-9\.a-vx-z_]*)(-py[0-9\.]*)?(-.
 FILENAME_RE2 = re.compile(r'([a-zA-Z_0-9\.]*)-([0-9\.a-vx-z_]*)(win32|win-amd64)?(-py[0-9\.]*)?')
 
 matrix = {}
-platforms = set()
 pkgs = set()
 platform_dependent_pkgs = set()
 python_versions = set()
@@ -53,7 +52,6 @@ for fname in filenames:
                     platform = platform[:-len(alias)] + replacement
                     break
 
-            platforms.add(platform)
             pkgs.add(pkg)
             if platform:
                 platform_dependent_pkgs.add(pkg)
@@ -95,8 +93,11 @@ for pyver in reversed(sorted(python_versions)):
             print '    <td style="%s">&nbsp;%s&nbsp;</td>' % (style1, platform,)
             for pkg in sorted(platform_dependent_pkgs):
                 files = [n for (p, n) in row_files if pkg == p]
-                print '    <td style="%s">&nbsp;%s</td>' % (style2,
-                        '<br>&nbsp;'.join(['<a href="%s">%s</a>' % (f, f) for f in files]))
+                if pkg == 'pywin32' and not platform.startswith('windows'):
+                    print '    <td style="border: 0; text-align: center; %s"> n/a </td>' % (style2,)
+                else:
+                    print '    <td style="%s">&nbsp;%s</td>' % (style2,
+                            '<br>&nbsp;'.join(['<a href="%s">%s</a>' % (f, f) for f in files]))
             print '  </tr>'
             first = False
 
-- 
2.45.2