From: Zooko O'Whielacronx Date: Sat, 20 Nov 2010 05:39:05 +0000 (-0800) Subject: misc: gen-package-table: show only the highest-numbered package for each platform... X-Git-Url: https://git.rkrishnan.org/specifications/%5B/%5D%20/flags/status?a=commitdiff_plain;h=f606ce068bac906f976736755c5497a093a1d134;p=tahoe-lafs%2Ftahoe-lafs.git misc: gen-package-table: show only the highest-numbered package for each platform and each library --- diff --git a/misc/build_helpers/gen-package-table.py b/misc/build_helpers/gen-package-table.py index 505ecbf0..e0c50b3f 100644 --- a/misc/build_helpers/gen-package-table.py +++ b/misc/build_helpers/gen-package-table.py @@ -3,6 +3,7 @@ # It expects to be run in the tahoe-lafs-dep-eggs directory. import re, os, sys +import pkg_resources extensions = ('.egg', '.tar.bz2', '.tar.gz', '.exe') platform_aliases = [('i686','x86'), ('i386','x86'), ('i86pc','x86'), ('win32','windows-x86'), @@ -93,11 +94,12 @@ for pyver in reversed(sorted(python_versions)): print '  %s ' % (style1, platform,) for pkg in sorted(platform_dependent_pkgs): files = [n for (p, n) in row_files if pkg == p] + bestfile = files and max([(pkg_resources.parse_version(x), x) for x in files])[1] or None if pkg == 'pywin32' and not platform.startswith('windows'): print ' n/a ' % (style2,) else: print '  %s' % (style2, - '
 '.join(['%s' % (f, f) for f in files])) + bestfile and '%s' % (bestfile, bestfile) or '') print ' ' first = False