diff options
Diffstat (limited to 'pavement.py')
-rw-r--r-- | pavement.py | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/pavement.py b/pavement.py index b1a4d7318..c0b5cb2d4 100644 --- a/pavement.py +++ b/pavement.py @@ -67,6 +67,7 @@ import subprocess import re try: from hashlib import md5 + from hashlib import sha256 except ImportError: from md5 import md5 @@ -137,6 +138,7 @@ MPKG_PYTHON = { "2.7": ["/Library/Frameworks/Python.framework/Versions/2.7/bin/python"], "3.2": ["/Library/Frameworks/Python.framework/Versions/3.2/bin/python3"], "3.3": ["/Library/Frameworks/Python.framework/Versions/3.3/bin/python3"], + "3.4": ["/Library/Frameworks/Python.framework/Versions/3.4/bin/python3"], } SSE3_CFG = {'ATLAS': r'C:\local\lib\atlas\sse3'} @@ -147,6 +149,7 @@ SITECFG = {"sse2" : SSE2_CFG, "sse3" : SSE3_CFG, "nosse" : NOSSE_CFG} if sys.platform =="darwin": WINDOWS_PYTHON = { + "3.4": ["wine", os.environ['HOME'] + "/.wine/drive_c/Python34/python.exe"], "3.3": ["wine", os.environ['HOME'] + "/.wine/drive_c/Python33/python.exe"], "3.2": ["wine", os.environ['HOME'] + "/.wine/drive_c/Python32/python.exe"], "2.7": ["wine", os.environ['HOME'] + "/.wine/drive_c/Python27/python.exe"], @@ -157,6 +160,7 @@ if sys.platform =="darwin": MAKENSIS = ["wine", "makensis"] elif sys.platform == "win32": WINDOWS_PYTHON = { + "3.4": ["C:\Python34\python.exe"], "3.3": ["C:\Python33\python.exe"], "3.2": ["C:\Python32\python.exe"], "2.7": ["C:\Python27\python.exe"], @@ -168,6 +172,7 @@ elif sys.platform == "win32": MAKENSIS = ["makensis"] else: WINDOWS_PYTHON = { + "3.4": ["wine", os.environ['HOME'] + "/.wine/drive_c/Python34/python.exe"], "3.3": ["wine", os.environ['HOME'] + "/.wine/drive_c/Python33/python.exe"], "3.2": ["wine", os.environ['HOME'] + "/.wine/drive_c/Python32/python.exe"], "2.7": ["wine", os.environ['HOME'] + "/.wine/drive_c/Python27/python.exe"], @@ -561,9 +566,20 @@ def sdist(options): def compute_md5(idirs): released = paver.path.path(idirs).listdir() checksums = [] - for f in released: + for f in sorted(released): m = md5(open(f, 'r').read()) - checksums.append('%s %s' % (m.hexdigest(), f)) + checksums.append('%s %s' % (m.hexdigest(), os.path.basename(f))) + + return checksums + +def compute_sha256(idirs): + # better checksum so gpg signed README.txt containing the sums can be used + # to verify the binaries instead of signing all binaries + released = paver.path.path(idirs).listdir() + checksums = [] + for f in sorted(released): + m = sha256(open(f, 'r').read()) + checksums.append('%s %s' % (m.hexdigest(), os.path.basename(f))) return checksums @@ -579,8 +595,17 @@ def write_release_task(options, filename='NOTES.txt'): Checksums ========= +MD5 +~~~ + """) ftarget.writelines(['%s\n' % c for c in compute_md5(idirs)]) + ftarget.writelines(""" +SHA256 +~~~~~~ + +""") + ftarget.writelines(['%s\n' % c for c in compute_sha256(idirs)]) def write_log_task(options, filename='Changelog'): st = subprocess.Popen( |