From: Daira Hopwood Date: Mon, 9 Sep 2013 22:18:18 +0000 (+0100) Subject: misc/build_helpers/gen-package-table.py: show Python 2.6 as unsupported on Windows. X-Git-Tag: allmydata-tahoe-1.10.1a1~216 X-Git-Url: https://git.rkrishnan.org/frontends/specifications/%5B%5E?a=commitdiff_plain;h=a0f477618d58c7b7f632176370ab9ee3965aa9c2;p=tahoe-lafs%2Ftahoe-lafs.git misc/build_helpers/gen-package-table.py: show Python 2.6 as unsupported on Windows. Signed-off-by: Daira Hopwood --- diff --git a/misc/build_helpers/gen-package-table.py b/misc/build_helpers/gen-package-table.py index 99a43ed0..283daeb8 100644 --- a/misc/build_helpers/gen-package-table.py +++ b/misc/build_helpers/gen-package-table.py @@ -8,6 +8,8 @@ import pkg_resources 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'} + 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\.]*)?') @@ -68,6 +70,7 @@ width = 100 / (len(platform_independent_pkgs) + 1) greybgstyle = '; background-color: #E0E0E0' nobgstyle = '' +unsupportedstyle = '; color: #C00000' print '' print '' @@ -93,6 +96,9 @@ for pyver in reversed(sorted(python_versions)): first = True for platform in sorted(matrix[pyver]): + unsupported_python = (platform in min_supported_python and + pyver.split('.') < min_supported_python[platform].split('.')) + if greybackground: bgstyle = greybgstyle else: @@ -101,10 +107,12 @@ for pyver in reversed(sorted(python_versions)): row_files = sorted(matrix[pyver][platform]) style1 = first and 'border-top: 2px solid #000000' or '' style1 += bgstyle + style1 += unsupported_python and unsupportedstyle or '' style2 = first and 'border-top: 2px solid #000000' or '' style2 += bgstyle + annotated_platform = platform.replace('-', '‑') + (unsupported_python and ' (unsupported)' or '') print ' ' - print '  %s ' % (style1, platform,) + print '  %s ' % (style1, annotated_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