mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +03:00
flake8
This commit is contained in:
parent
951923f755
commit
eb73fe3bdb
|
@ -13,8 +13,8 @@ def setup_vms():
|
||||||
ret = []
|
ret = []
|
||||||
for py in pythons.keys():
|
for py in pythons.keys():
|
||||||
for arch in ('', X64_EXT):
|
for arch in ('', X64_EXT):
|
||||||
ret.append("virtualenv -p c:/Python%s%s/python.exe --clear %s%s%s" %
|
ret.append("virtualenv -p c:/Python%s%s/python.exe --clear %s%s%s"
|
||||||
(py, arch, VIRT_BASE, py, arch))
|
% (py, arch, VIRT_BASE, py, arch))
|
||||||
ret.append("%s%s%s\Scripts\pip.exe install nose" %
|
ret.append("%s%s%s\Scripts\pip.exe install nose" %
|
||||||
(VIRT_BASE, py, arch))
|
(VIRT_BASE, py, arch))
|
||||||
if py == '26':
|
if py == '26':
|
||||||
|
@ -109,13 +109,15 @@ def main(op):
|
||||||
scripts.append((py_version,
|
scripts.append((py_version,
|
||||||
"\n".join([header(op),
|
"\n".join([header(op),
|
||||||
build_one(py_version,
|
build_one(py_version,
|
||||||
compilers[(compiler_version, 32)]),
|
compilers[(compiler_version,
|
||||||
|
32)]),
|
||||||
footer()])))
|
footer()])))
|
||||||
|
|
||||||
scripts.append(("%s%s" % (py_version, X64_EXT),
|
scripts.append(("%s%s" % (py_version, X64_EXT),
|
||||||
"\n".join([header(op),
|
"\n".join([header(op),
|
||||||
build_one("%sx64" % py_version,
|
build_one("%sx64" % py_version,
|
||||||
compilers[(compiler_version, 64)]),
|
compilers[(compiler_version,
|
||||||
|
64)]),
|
||||||
footer()])))
|
footer()])))
|
||||||
|
|
||||||
results = map(run_script, scripts)
|
results = map(run_script, scripts)
|
||||||
|
|
|
@ -4,7 +4,7 @@ from untar import untar
|
||||||
import os
|
import os
|
||||||
import hashlib
|
import hashlib
|
||||||
|
|
||||||
from config import *
|
from config import bin_libs, compilers, compiler_fromEnv, libs
|
||||||
|
|
||||||
|
|
||||||
def _relpath(*args):
|
def _relpath(*args):
|
||||||
|
@ -64,10 +64,12 @@ def fetch_libs():
|
||||||
if name == 'openjpeg':
|
if name == 'openjpeg':
|
||||||
filename = check_hash(fetch(lib['url']), lib['hash'])
|
filename = check_hash(fetch(lib['url']), lib['hash'])
|
||||||
for compiler in compilers.values():
|
for compiler in compilers.values():
|
||||||
if not os.path.exists(os.path.join(build_dir, lib['dir']+compiler['inc_dir'])):
|
if not os.path.exists(os.path.join(
|
||||||
|
build_dir, lib['dir']+compiler['inc_dir'])):
|
||||||
extract(filename, build_dir)
|
extract(filename, build_dir)
|
||||||
os.rename(os.path.join(build_dir, lib['dir']),
|
os.rename(os.path.join(build_dir, lib['dir']),
|
||||||
os.path.join(build_dir, lib['dir']+compiler['inc_dir']))
|
os.path.join(
|
||||||
|
build_dir, lib['dir']+compiler['inc_dir']))
|
||||||
else:
|
else:
|
||||||
extract(check_hash(fetch(lib['url']), lib['hash']), build_dir)
|
extract(check_hash(fetch(lib['url']), lib['hash']), build_dir)
|
||||||
|
|
||||||
|
|
|
@ -11,108 +11,106 @@ pythons = {#'26': 7,
|
||||||
VIRT_BASE = "c:/vp/"
|
VIRT_BASE = "c:/vp/"
|
||||||
X64_EXT = os.environ.get('X64_EXT', "x64")
|
X64_EXT = os.environ.get('X64_EXT', "x64")
|
||||||
|
|
||||||
libs = {'zlib': {
|
libs = {
|
||||||
'url': 'http://zlib.net/zlib128.zip',
|
'zlib': {
|
||||||
'hash': 'md5:126f8676442ffbd97884eb4d6f32afb4',
|
'url': 'http://zlib.net/zlib128.zip',
|
||||||
'dir': 'zlib-1.2.8',
|
'hash': 'md5:126f8676442ffbd97884eb4d6f32afb4',
|
||||||
|
'dir': 'zlib-1.2.8',
|
||||||
},
|
},
|
||||||
'jpeg': {
|
'jpeg': {
|
||||||
'url': 'http://www.ijg.org/files/jpegsr9a.zip',
|
'url': 'http://www.ijg.org/files/jpegsr9a.zip',
|
||||||
'hash': 'md5:a34f3c82760270ee1e1885b15b90a72e', # not found - generated by wiredfool
|
'hash': 'md5:a34f3c82760270ee1e1885b15b90a72e', # not found - generated by wiredfool
|
||||||
'dir': 'jpeg-9a',
|
'dir': 'jpeg-9a',
|
||||||
},
|
},
|
||||||
'tiff': {
|
'tiff': {
|
||||||
'url': 'ftp://ftp.remotesensing.org/pub/libtiff/tiff-4.0.4.zip',
|
'url': 'ftp://ftp.remotesensing.org/pub/libtiff/tiff-4.0.4.zip',
|
||||||
'hash': 'md5:8f538a34156188f9a8dcddb679c65d1e', # not found - generated by wiredfool
|
'hash': 'md5:8f538a34156188f9a8dcddb679c65d1e', # not found - generated by wiredfool
|
||||||
'dir': 'tiff-4.0.4',
|
'dir': 'tiff-4.0.4',
|
||||||
},
|
|
||||||
'freetype': {
|
|
||||||
'url': 'http://download.savannah.gnu.org/releases/freetype/freetype-2.6.tar.gz',
|
|
||||||
'hash': 'md5:1d733ea6c1b7b3df38169fbdbec47d2b',
|
|
||||||
'dir': 'freetype-2.6',
|
|
||||||
},
|
},
|
||||||
'lcms': {
|
'freetype': {
|
||||||
'url': SF_MIRROR+'/project/lcms/lcms/2.7/lcms2-2.7.zip',
|
'url': 'http://download.savannah.gnu.org/releases/freetype/freetype-2.6.tar.gz',
|
||||||
'hash': 'sha1:7ff1a5b721ca719760ba6eb4ec6f38d5e65381cf',
|
'hash': 'md5:1d733ea6c1b7b3df38169fbdbec47d2b',
|
||||||
'dir': 'lcms2-2.7',
|
'dir': 'freetype-2.6',
|
||||||
},
|
|
||||||
'tcl-8.5': {
|
|
||||||
'url': SF_MIRROR+'/project/tcl/Tcl/8.5.18/tcl8518-src.zip',
|
|
||||||
'hash': 'sha1:4c2aed9043088c630a4c795265e2738ef1b4db3b',
|
|
||||||
'dir': '',
|
|
||||||
},
|
|
||||||
'tk-8.5': {
|
|
||||||
'url': SF_MIRROR+'/project/tcl/Tcl/8.5.18/tk8518-src.zip',
|
|
||||||
'hash': 'sha1:273f55148777413774aa722ecad25cabda1e31ae',
|
|
||||||
'dir': '',
|
|
||||||
},
|
},
|
||||||
'tcl-8.6': {
|
'lcms': {
|
||||||
'url': SF_MIRROR+'/project/tcl/Tcl/8.6.4/tcl864-src.zip',
|
'url': SF_MIRROR+'/project/lcms/lcms/2.7/lcms2-2.7.zip',
|
||||||
'hash': 'md5:35748d2fc61e08a2fdb23b85c6f8c4a0',
|
'hash': 'sha1:7ff1a5b721ca719760ba6eb4ec6f38d5e65381cf',
|
||||||
'dir': '',
|
'dir': 'lcms2-2.7',
|
||||||
},
|
|
||||||
'tk-8.6': {
|
|
||||||
'url': SF_MIRROR+'/project/tcl/Tcl/8.6.4/tk864-src.zip',
|
|
||||||
'hash': 'md5:111d45061a69e7f5250b6ec8ca7c4f35',
|
|
||||||
'dir': '',
|
|
||||||
},
|
},
|
||||||
'webp': {
|
'tcl-8.5': {
|
||||||
'url': 'http://downloads.webmproject.org/releases/webp/libwebp-0.4.3.tar.gz',
|
'url': SF_MIRROR+'/project/tcl/Tcl/8.5.18/tcl8518-src.zip',
|
||||||
'hash': 'sha1:1c307a61c4d0018620b4ba9a58e8f48a8d6640ef',
|
'hash': 'sha1:4c2aed9043088c630a4c795265e2738ef1b4db3b',
|
||||||
'dir': 'libwebp-0.4.3',
|
'dir': '',
|
||||||
|
|
||||||
},
|
},
|
||||||
'openjpeg': {
|
'tk-8.5': {
|
||||||
'url': SF_MIRROR+'/project/openjpeg/openjpeg/2.1.0/openjpeg-2.1.0.tar.gz',
|
'url': SF_MIRROR+'/project/tcl/Tcl/8.5.18/tk8518-src.zip',
|
||||||
'hash': 'md5:f6419fcc233df84f9a81eb36633c6db6',
|
'hash': 'sha1:273f55148777413774aa722ecad25cabda1e31ae',
|
||||||
'dir': 'openjpeg-2.1.0',
|
'dir': '',
|
||||||
},
|
},
|
||||||
|
'tcl-8.6': {
|
||||||
}
|
'url': SF_MIRROR+'/project/tcl/Tcl/8.6.4/tcl864-src.zip',
|
||||||
|
'hash': 'md5:35748d2fc61e08a2fdb23b85c6f8c4a0',
|
||||||
|
'dir': '',
|
||||||
|
},
|
||||||
|
'tk-8.6': {
|
||||||
|
'url': SF_MIRROR+'/project/tcl/Tcl/8.6.4/tk864-src.zip',
|
||||||
|
'hash': 'md5:111d45061a69e7f5250b6ec8ca7c4f35',
|
||||||
|
'dir': '',
|
||||||
|
},
|
||||||
|
'webp': {
|
||||||
|
'url': 'http://downloads.webmproject.org/releases/webp/libwebp-0.4.3.tar.gz',
|
||||||
|
'hash': 'sha1:1c307a61c4d0018620b4ba9a58e8f48a8d6640ef',
|
||||||
|
'dir': 'libwebp-0.4.3',
|
||||||
|
},
|
||||||
|
'openjpeg': {
|
||||||
|
'url': SF_MIRROR+'/project/openjpeg/openjpeg/2.1.0/openjpeg-2.1.0.tar.gz',
|
||||||
|
'hash': 'md5:f6419fcc233df84f9a81eb36633c6db6',
|
||||||
|
'dir': 'openjpeg-2.1.0',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
bin_libs = {
|
bin_libs = {
|
||||||
'openjpeg': {
|
'openjpeg': {
|
||||||
'filename': 'openjpeg-2.0.0-win32-x86.zip',
|
'filename': 'openjpeg-2.0.0-win32-x86.zip',
|
||||||
'hash': 'sha1:xxx',
|
'hash': 'sha1:xxx',
|
||||||
'version': '2.0'
|
'version': '2.0'
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
compilers = {(7, 64): {
|
|
||||||
'env_version': 'v7.0',
|
|
||||||
'vc_version': '2008',
|
|
||||||
'env_flags': '/x64 /xp',
|
|
||||||
'inc_dir': 'msvcr90-x64',
|
|
||||||
'platform': 'x64',
|
|
||||||
'webp_platform': 'x64',
|
|
||||||
},
|
},
|
||||||
(7, 32): {
|
}
|
||||||
'env_version': 'v7.0',
|
|
||||||
'vc_version': '2008',
|
|
||||||
'env_flags': '/x86 /xp',
|
|
||||||
'inc_dir': 'msvcr90-x32',
|
|
||||||
'platform': 'Win32',
|
|
||||||
'webp_platform': 'x86',
|
|
||||||
},
|
|
||||||
|
|
||||||
(7.1, 64): {
|
compilers = {
|
||||||
'env_version': 'v7.1',
|
(7, 64): {
|
||||||
'vc_version': '2010',
|
'env_version': 'v7.0',
|
||||||
'env_flags': '/x64 /vista',
|
'vc_version': '2008',
|
||||||
'inc_dir': 'msvcr10-x64',
|
'env_flags': '/x64 /xp',
|
||||||
'platform': 'x64',
|
'inc_dir': 'msvcr90-x64',
|
||||||
'webp_platform': 'x64',
|
'platform': 'x64',
|
||||||
},
|
'webp_platform': 'x64',
|
||||||
(7.1, 32): {
|
|
||||||
'env_version': 'v7.1',
|
|
||||||
'vc_version': '2010',
|
|
||||||
'env_flags': '/x86 /vista',
|
|
||||||
'inc_dir': 'msvcr10-x32',
|
|
||||||
'platform': 'Win32',
|
|
||||||
'webp_platform': 'x86',
|
|
||||||
},
|
},
|
||||||
|
(7, 32): {
|
||||||
}
|
'env_version': 'v7.0',
|
||||||
|
'vc_version': '2008',
|
||||||
|
'env_flags': '/x86 /xp',
|
||||||
|
'inc_dir': 'msvcr90-x32',
|
||||||
|
'platform': 'Win32',
|
||||||
|
'webp_platform': 'x86',
|
||||||
|
},
|
||||||
|
(7.1, 64): {
|
||||||
|
'env_version': 'v7.1',
|
||||||
|
'vc_version': '2010',
|
||||||
|
'env_flags': '/x64 /vista',
|
||||||
|
'inc_dir': 'msvcr10-x64',
|
||||||
|
'platform': 'x64',
|
||||||
|
'webp_platform': 'x64',
|
||||||
|
},
|
||||||
|
(7.1, 32): {
|
||||||
|
'env_version': 'v7.1',
|
||||||
|
'vc_version': '2010',
|
||||||
|
'env_flags': '/x86 /vista',
|
||||||
|
'inc_dir': 'msvcr10-x32',
|
||||||
|
'platform': 'Win32',
|
||||||
|
'webp_platform': 'x86',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
def pyversion_fromEnv():
|
def pyversion_fromEnv():
|
||||||
|
|
|
@ -5,8 +5,8 @@ if __name__ == '__main__':
|
||||||
for version in ['2.6.5', '2.7.6', '3.2.5', '3.3.5', '3.4.3']:
|
for version in ['2.6.5', '2.7.6', '3.2.5', '3.3.5', '3.4.3']:
|
||||||
for platform in ['', '.amd64']:
|
for platform in ['', '.amd64']:
|
||||||
for extension in ['', '.asc']:
|
for extension in ['', '.asc']:
|
||||||
fetch('https://www.python.org/ftp/python/%s/python-%s%s.msi%s' % (
|
fetch('https://www.python.org/ftp/python/%s/python-%s%s.msi%s'
|
||||||
version, version, platform, extension))
|
% (version, version, platform, extension))
|
||||||
|
|
||||||
# find pip, if it's not in the path!
|
# find pip, if it's not in the path!
|
||||||
os.system('pip install virtualenv')
|
os.system('pip install virtualenv')
|
||||||
|
|
|
@ -5,14 +5,15 @@ import os
|
||||||
import glob
|
import glob
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from config import *
|
from config import pythons, VIRT_BASE, X64_EXT
|
||||||
|
|
||||||
|
|
||||||
def test_one(params):
|
def test_one(params):
|
||||||
python, architecture = params
|
python, architecture = params
|
||||||
try:
|
try:
|
||||||
print("Running: %s, %s" % params)
|
print("Running: %s, %s" % params)
|
||||||
command = [r'%s\%s%s\Scripts\python.exe' % (VIRT_BASE, python, architecture),
|
command = [r'%s\%s%s\Scripts\python.exe' %
|
||||||
|
(VIRT_BASE, python, architecture),
|
||||||
'test-installed.py',
|
'test-installed.py',
|
||||||
'--processes=-0',
|
'--processes=-0',
|
||||||
'--process-timeout=30',
|
'--process-timeout=30',
|
||||||
|
|
Loading…
Reference in New Issue
Block a user