Removed winbuild checksum verification

This commit is contained in:
Andrew Murray 2017-03-27 09:08:16 +11:00
parent c6d49e9b27
commit 78754327c5
2 changed files with 2 additions and 28 deletions

View File

@ -1,7 +1,6 @@
from unzip import unzip from unzip import unzip
from untar import untar from untar import untar
import os import os
import hashlib
from config import compilers, compiler_from_env, libs from config import compilers, compiler_from_env, libs
@ -14,19 +13,6 @@ build_dir = _relpath('build')
inc_dir = _relpath('depends') inc_dir = _relpath('depends')
def check_hash(filename, checksum):
if not checksum:
return filename
(algo, value) = checksum.split(':')
h = hashlib.new(algo)
with open(filename, 'rb') as f:
h.update(f.read())
if not(h.hexdigest().lower() == value):
raise ValueError('Checksum Mismatch for %s' % filename)
return filename
def check_sig(filename, signame): def check_sig(filename, signame):
# UNDONE -- need gpg # UNDONE -- need gpg
return filename return filename
@ -57,8 +43,8 @@ def extract(src, dest):
def extract_libs(): def extract_libs():
for name, lib in libs.items(): for name, lib in libs.items():
filename = lib['filename']
if name == 'openjpeg': if name == 'openjpeg':
filename = check_hash(lib['filename'], lib['hash'])
for compiler in compilers.values(): for compiler in compilers.values():
if not os.path.exists(os.path.join( if not os.path.exists(os.path.join(
build_dir, lib['dir']+compiler['inc_dir'])): build_dir, lib['dir']+compiler['inc_dir'])):
@ -67,7 +53,7 @@ def extract_libs():
os.path.join( os.path.join(
build_dir, lib['dir']+compiler['inc_dir'])) build_dir, lib['dir']+compiler['inc_dir']))
else: else:
extract(check_hash(lib['filename'], lib['hash']), build_dir) extract(filename, build_dir)
def extract_openjpeg(compiler): def extract_openjpeg(compiler):

View File

@ -15,75 +15,63 @@ X64_EXT = os.environ.get('X64_EXT', "x64")
libs = { libs = {
# 'openjpeg': { # 'openjpeg': {
# 'filename': 'openjpeg-2.0.0-win32-x86.zip', # 'filename': 'openjpeg-2.0.0-win32-x86.zip',
# 'hash': 'sha1:xxx',
# 'version': '2.0' # 'version': '2.0'
# }, # },
'zlib': { 'zlib': {
'url': 'http://zlib.net/zlib1211.zip', 'url': 'http://zlib.net/zlib1211.zip',
'filename': PILLOW_DEPENDS_DIR + 'zlib1211.zip', 'filename': PILLOW_DEPENDS_DIR + 'zlib1211.zip',
'hash': 'md5:16b41357b2cd81bca5e1947238e64465',
'dir': 'zlib-1.2.11', 'dir': 'zlib-1.2.11',
}, },
'jpeg': { 'jpeg': {
'url': 'http://www.ijg.org/files/jpegsr9b.zip', 'url': 'http://www.ijg.org/files/jpegsr9b.zip',
'filename': PILLOW_DEPENDS_DIR + 'jpegsr9b.zip', 'filename': PILLOW_DEPENDS_DIR + 'jpegsr9b.zip',
'hash': 'md5:a21b8024d78ba05857a75272b4fa95ec', # not found - generated by wiredfool
'dir': 'jpeg-9b', 'dir': 'jpeg-9b',
}, },
'tiff': { 'tiff': {
'url': 'ftp://ftp.remotesensing.org/pub/libtiff/tiff-4.0.7.zip', 'url': 'ftp://ftp.remotesensing.org/pub/libtiff/tiff-4.0.7.zip',
'filename': PILLOW_DEPENDS_DIR + 'tiff-4.0.7.zip', 'filename': PILLOW_DEPENDS_DIR + 'tiff-4.0.7.zip',
'hash': 'md5:876ad5f2f471954ddec915b77e7f75dd',
'dir': 'tiff-4.0.7', 'dir': 'tiff-4.0.7',
}, },
'freetype': { 'freetype': {
'url': 'https://download.savannah.gnu.org/releases/freetype/freetype-2.7.1.tar.gz', 'url': 'https://download.savannah.gnu.org/releases/freetype/freetype-2.7.1.tar.gz',
'filename': PILLOW_DEPENDS_DIR + 'freetype-2.7.1.tar.gz', 'filename': PILLOW_DEPENDS_DIR + 'freetype-2.7.1.tar.gz',
'hash': 'md5:78701bee8d249578d83bb9a2f3aa3616',
'dir': 'freetype-2.7.1', 'dir': 'freetype-2.7.1',
}, },
'lcms': { 'lcms': {
'url': SF_MIRROR+'/project/lcms/lcms/2.7/lcms2-2.7.zip', 'url': SF_MIRROR+'/project/lcms/lcms/2.7/lcms2-2.7.zip',
'filename': PILLOW_DEPENDS_DIR + 'lcms2-2.7.zip', 'filename': PILLOW_DEPENDS_DIR + 'lcms2-2.7.zip',
'hash': 'sha1:7ff1a5b721ca719760ba6eb4ec6f38d5e65381cf',
'dir': 'lcms2-2.7', 'dir': 'lcms2-2.7',
}, },
'tcl-8.5': { 'tcl-8.5': {
'url': SF_MIRROR+'/project/tcl/Tcl/8.5.19/tcl8519-src.zip', 'url': SF_MIRROR+'/project/tcl/Tcl/8.5.19/tcl8519-src.zip',
'filename': PILLOW_DEPENDS_DIR + 'tcl8519-src.zip', 'filename': PILLOW_DEPENDS_DIR + 'tcl8519-src.zip',
'hash': 'sha1:9de57fd34bd688716c16c978db96fa16a5fde924',
'dir': '', 'dir': '',
}, },
'tk-8.5': { 'tk-8.5': {
'url': SF_MIRROR+'/project/tcl/Tcl/8.5.19/tk8519-src.zip', 'url': SF_MIRROR+'/project/tcl/Tcl/8.5.19/tk8519-src.zip',
'filename': PILLOW_DEPENDS_DIR + 'tk8519-src.zip', 'filename': PILLOW_DEPENDS_DIR + 'tk8519-src.zip',
'hash': 'sha1:78d0d2c81e024e0b48bfd7b2cc16718f08f46ed9',
'dir': '', 'dir': '',
'version': '8.5.19', 'version': '8.5.19',
}, },
'tcl-8.6': { 'tcl-8.6': {
'url': SF_MIRROR+'/project/tcl/Tcl/8.6.6/tcl866-src.zip', 'url': SF_MIRROR+'/project/tcl/Tcl/8.6.6/tcl866-src.zip',
'filename': PILLOW_DEPENDS_DIR + 'tcl866-src.zip', 'filename': PILLOW_DEPENDS_DIR + 'tcl866-src.zip',
'hash': 'md5:45dae95abc12a5f8c29dca5baf169a13',
'dir': '', 'dir': '',
}, },
'tk-8.6': { 'tk-8.6': {
'url': SF_MIRROR+'/project/tcl/Tcl/8.6.6/tk866-src.zip', 'url': SF_MIRROR+'/project/tcl/Tcl/8.6.6/tk866-src.zip',
'filename': PILLOW_DEPENDS_DIR + 'tk866-src.zip', 'filename': PILLOW_DEPENDS_DIR + 'tk866-src.zip',
'hash': 'md5:5004cc0ed2ab820406a36a0c0553b917',
'dir': '', 'dir': '',
'version': '8.6.6', 'version': '8.6.6',
}, },
'webp': { 'webp': {
'url': 'http://downloads.webmproject.org/releases/webp/libwebp-0.6.0.tar.gz', 'url': 'http://downloads.webmproject.org/releases/webp/libwebp-0.6.0.tar.gz',
'filename': PILLOW_DEPENDS_DIR + 'libwebp-0.6.0.tar.gz', 'filename': PILLOW_DEPENDS_DIR + 'libwebp-0.6.0.tar.gz',
'hash': 'sha1:156d24fff454bfccd1f44434e226a10d9eb38186',
'dir': 'libwebp-0.6.0', 'dir': 'libwebp-0.6.0',
}, },
'openjpeg': { 'openjpeg': {
'url': SF_MIRROR+'/project/openjpeg/openjpeg/2.1.2/openjpeg-2.1.2.tar.gz', 'url': SF_MIRROR+'/project/openjpeg/openjpeg/2.1.2/openjpeg-2.1.2.tar.gz',
'filename': PILLOW_DEPENDS_DIR + 'openjpeg-2.1.2.tar.gz', 'filename': PILLOW_DEPENDS_DIR + 'openjpeg-2.1.2.tar.gz',
'hash': 'md5:40a7bfdcc66280b3c1402a0eb1a27624',
'dir': 'openjpeg-2.1.2', 'dir': 'openjpeg-2.1.2',
}, },
} }