diff --git a/misc/build_helpers/gen-package-table.py b/misc/build_helpers/gen-package-table.py
index 283daeb88..cd6bdc3c4 100644
--- a/misc/build_helpers/gen-package-table.py
+++ b/misc/build_helpers/gen-package-table.py
@@ -9,6 +9,7 @@ extensions = ('.egg', '.tar.bz2', '.tar.gz', '.exe')
platform_aliases = [('i686','x86'), ('i386','x86'), ('i86pc','x86'), ('win32','windows-x86'),
('win-amd64','windows-x86_64'), ('amd64','x86_64')]
min_supported_python = {'windows-x86': '2.7', 'windows-x86_64': '2.7'}
+pkg_name_continuations = ('modules')
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\.]*)?')
@@ -18,11 +19,13 @@ pkgs = set()
platform_dependent_pkgs = set()
python_versions = set()
-depdir = '.'
+depdirs = ['.', '../tahoe-dep-sdists']
if len(sys.argv) > 1:
- depdir = sys.argv[1]
+ depdirs = sys.argv[1 :]
-filenames = os.listdir(depdir)
+filenames = set()
+for depdir in depdirs:
+ filenames = filenames.union(os.listdir(depdir))
def add(d, k, v):
if k in d:
@@ -36,12 +39,16 @@ for fname in filenames:
m = FILENAME_RE.match(fname[:-len(ext)])
try:
pkg = m.group(1)
- pythonver = (m.group(3) or '-py')[3:]
- platform = (m.group(4) or '-')[1:]
+ pkg2 = m.group(2)
+ if pkg2 in pkg_name_continuations:
+ pkg += '-' + pkg2
+ else:
+ pythonver = (m.group(3) or '-py')[3:]
+ platform = (m.group(4) or '-')[1:]
except (IndexError, AttributeError, TypeError):
continue
- if not pythonver:
+ if not pkg2 in pkg_name_continuations and not pythonver:
m = FILENAME_RE2.match(fname[:-len(ext)])
if m.group(3):
try:
@@ -66,7 +73,11 @@ for fname in filenames:
platform_independent_pkgs = pkgs - platform_dependent_pkgs
-width = 100 / (len(platform_independent_pkgs) + 1)
+width = 100 / (len(platform_dependent_pkgs) + 1)
+
+def file_list(all_files, pkg):
+ files = sorted([(pkg_resources.parse_version(n), n) for (p, n) in all_files if pkg == p])
+ return '
'.join(['%s' % (f, f) for (v, f) in files])
greybgstyle = '; background-color: #E0E0E0'
nobgstyle = ''
@@ -91,7 +102,7 @@ for pyver in reversed(sorted(python_versions)):
print '