mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-13 05:06:49 +03:00
Health fixes
This commit is contained in:
parent
40ae907342
commit
8a7080cbce
|
@ -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"""
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user