mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-10 19:56:47 +03:00
Health fixes
This commit is contained in:
parent
40ae907342
commit
8a7080cbce
|
@ -45,7 +45,7 @@ def run_script(params):
|
|||
|
||||
|
||||
def header(op):
|
||||
return r"""
|
||||
return r"""
|
||||
setlocal
|
||||
set MPLSRC=%%~dp0\..
|
||||
set INCLIB=%%~dp0\depends
|
||||
|
|
|
@ -2,7 +2,6 @@ from fetch import fetch
|
|||
from unzip import unzip
|
||||
from untar import untar
|
||||
import os, hashlib
|
||||
import shutil
|
||||
|
||||
from config import *
|
||||
|
||||
|
@ -33,16 +32,16 @@ def check_sig(filename, signame):
|
|||
def mkdirs():
|
||||
try:
|
||||
os.mkdir(build_dir)
|
||||
except:
|
||||
except OSError:
|
||||
pass
|
||||
try:
|
||||
os.mkdir(inc_dir)
|
||||
except:
|
||||
except OSError:
|
||||
pass
|
||||
for compiler in compilers.values():
|
||||
try:
|
||||
os.mkdir(os.path.join(inc_dir, compiler['inc_dir']))
|
||||
except:
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
def extract(src, dest):
|
||||
|
@ -66,15 +65,6 @@ def fetch_libs():
|
|||
def extract_binlib():
|
||||
lib = bin_libs['openjpeg']
|
||||
extract(lib['filename'], build_dir)
|
||||
return
|
||||
base = os.path.splitext(lib['filename'])[0]
|
||||
for compiler in compilers.values():
|
||||
shutil.copy(os.path.join(inc_dir, base, 'include', 'openjpeg-%s' % lib['version']),
|
||||
os.path.join(inc_dir, compiler['inc_dir']))
|
||||
shutil.copy(os.path.join(inc_dir, base, 'bin', 'openjp2.dll'),
|
||||
os.path.join(inc_dir, compiler['inc_dir']))
|
||||
shutil.copy(os.path.join(inc_dir, base, 'lib', 'openjp2.lib'),
|
||||
os.path.join(inc_dir, compiler['inc_dir']))
|
||||
|
||||
def extract_openjpeg(compiler):
|
||||
return r"""
|
||||
|
@ -212,9 +202,9 @@ endlocal
|
|||
""" % compiler
|
||||
|
||||
def msbuild_freetype(compiler):
|
||||
if compiler['env_version'] == 'v7.1':
|
||||
return msbuild_freetype_71(compiler)
|
||||
return msbuild_freetype_70(compiler)
|
||||
if compiler['env_version'] == 'v7.1':
|
||||
return msbuild_freetype_71(compiler)
|
||||
return msbuild_freetype_70(compiler)
|
||||
|
||||
def msbuild_freetype_71(compiler):
|
||||
return r"""
|
||||
|
|
|
@ -118,7 +118,7 @@ def pyversion_fromEnv():
|
|||
py = os.environ['PYTHON']
|
||||
|
||||
py_version = '27'
|
||||
for k,v in pythons.items():
|
||||
for k in pythons.keys():
|
||||
if k in py:
|
||||
py_version = k
|
||||
break
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import sys, zipfile
|
||||
|
||||
def unzip(src, dest):
|
||||
with zipfile.ZipFile(src) as zf:
|
||||
zf.extractall(dest)
|
||||
with zipfile.ZipFile(src) as zf:
|
||||
zf.extractall(dest)
|
||||
|
||||
if __name__=='__main__':
|
||||
unzip(sys.argv[1], sys.argv[2])
|
||||
unzip(sys.argv[1], sys.argv[2])
|
||||
|
|
Loading…
Reference in New Issue
Block a user