mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-24 17:06:16 +03:00
commit
40ae907342
|
@ -67,12 +67,17 @@ def build_one(py_ver, compiler):
|
|||
else:
|
||||
args['python_path'] = "%s%s\\Scripts" % (VIRT_BASE, py_ver)
|
||||
args['py_ver'] = py_ver
|
||||
if '34' in py_ver:
|
||||
args['tcl_ver'] = '86'
|
||||
else:
|
||||
args['tcl_ver'] = '85'
|
||||
|
||||
return r"""
|
||||
setlocal EnableDelayedExpansion
|
||||
call "%%ProgramFiles%%\Microsoft SDKs\Windows\%(env_version)s\Bin\SetEnv.Cmd" /Release %(env_flags)s
|
||||
set DISTUTILS_USE_SDK=1
|
||||
set LIB=%%LIB%%;%%INCLIB%%\%(inc_dir)s
|
||||
set INCLUDE=%%INCLUDE%%;%%INCLIB%%\%(inc_dir)s;%%INCLIB%%\tcl85\include
|
||||
set INCLUDE=%%INCLUDE%%;%%INCLIB%%\%(inc_dir)s;%%INCLIB%%\tcl%(tcl_ver)s\include
|
||||
|
||||
setlocal
|
||||
set LIB=%%LIB%%;C:\Python%(py_ver)s\tcl
|
||||
|
|
|
@ -95,6 +95,11 @@ mkdir %INCLIB%\tcl85\include\X11
|
|||
copy /Y /B %BUILD%\tcl8.5.13\generic\*.h %INCLIB%\tcl85\include\
|
||||
copy /Y /B %BUILD%\tk8.5.13\generic\*.h %INCLIB%\tcl85\include\
|
||||
copy /Y /B %BUILD%\tk8.5.13\xlib\X11\* %INCLIB%\tcl85\include\X11\
|
||||
|
||||
mkdir %INCLIB%\tcl86\include\X11
|
||||
copy /Y /B %BUILD%\tcl8.6.4\generic\*.h %INCLIB%\tcl86\include\
|
||||
copy /Y /B %BUILD%\tk8.6.4\generic\*.h %INCLIB%\tcl86\include\
|
||||
copy /Y /B %BUILD%\tk8.6.4\xlib\X11\* %INCLIB%\tcl86\include\X11\
|
||||
"""
|
||||
|
||||
def header():
|
||||
|
@ -237,15 +242,36 @@ endlocal
|
|||
""" %compiler
|
||||
|
||||
def build_lcms2(compiler):
|
||||
if compiler['env_version'] == 'v7.1':
|
||||
return build_lcms_71(compiler)
|
||||
return build_lcms_70(compiler)
|
||||
|
||||
def build_lcms_70(compiler):
|
||||
"""Link error here on x64"""
|
||||
if compiler['platform'] == 'x64': return ''
|
||||
|
||||
"""Build LCMS on VC2008. This version is only 32bit/Win32"""
|
||||
return r"""
|
||||
rem Build lcms2
|
||||
setlocal
|
||||
rd /S /Q %%LCMS%%\Lib
|
||||
rd /S /Q %%LCMS%%\Projects\VC%(vc_version)s\Release
|
||||
%%MSBUILD%% %%LCMS%%\Projects\VC%(vc_version)s\lcms2.sln /t:Clean /p:Configuration="Release" /p:Platform=%(platform)s /m
|
||||
%%MSBUILD%% %%LCMS%%\Projects\VC%(vc_version)s\lcms2.sln /t:lcms2_static /p:Configuration="Release" /p:Platform=%(platform)s /m
|
||||
%%MSBUILD%% %%LCMS%%\Projects\VC%(vc_version)s\lcms2.sln /t:Clean /p:Configuration="Release" /p:Platform=Win32 /m
|
||||
%%MSBUILD%% %%LCMS%%\Projects\VC%(vc_version)s\lcms2.sln /t:lcms2_static /p:Configuration="Release" /p:Platform=Win32 /m
|
||||
xcopy /Y /E /Q %%LCMS%%\include %%INCLIB%%
|
||||
copy /Y /B %%LCMS%%\Projects\VC%(vc_version)s\Release\*.lib %%INCLIB%%
|
||||
endlocal
|
||||
""" % compiler
|
||||
|
||||
def build_lcms_71(compiler):
|
||||
return r"""
|
||||
rem Build lcms2
|
||||
setlocal
|
||||
rd /S /Q %%LCMS%%\Lib
|
||||
rd /S /Q %%LCMS%%\Projects\VC%(vc_version)s\Release
|
||||
%%MSBUILD%% %%LCMS%%\Projects\VC%(vc_version)s\lcms2.sln /t:Clean /p:Configuration="Release" /p:Platform=%(platform)s /m
|
||||
%%MSBUILD%% %%LCMS%%\Projects\VC%(vc_version)s\lcms2.sln /t:lcms2_static /p:Configuration="Release" /p:Platform=%(platform)s /m
|
||||
xcopy /Y /E /Q %%LCMS%%\include %%INCLIB%%
|
||||
copy /Y /B %%LCMS%%\Lib\MS\*.lib %%INCLIB%%
|
||||
endlocal
|
||||
""" % compiler
|
||||
|
@ -258,7 +284,7 @@ def add_compiler(compiler):
|
|||
#script.append(extract_openjpeg(compiler))
|
||||
|
||||
script.append(msbuild_freetype(compiler))
|
||||
#script.append(build_lcms2(compiler))
|
||||
script.append(build_lcms2(compiler))
|
||||
#script.append(nmake_openjpeg(compiler))
|
||||
script.append(end_compiler())
|
||||
|
||||
|
@ -267,16 +293,17 @@ def add_compiler(compiler):
|
|||
mkdirs()
|
||||
fetch_libs()
|
||||
#extract_binlib()
|
||||
script = [header()] #, cp_tk()]
|
||||
script = [header(), cp_tk()]
|
||||
|
||||
|
||||
|
||||
if 'PYTHON' in os.environ:
|
||||
add_compiler(compiler_fromEnv())
|
||||
else:
|
||||
for compiler in compilers.values():
|
||||
add_compiler(compiler)
|
||||
#add_compiler(compilers[(7,32)])
|
||||
#for compiler in compilers.values():
|
||||
#add_compiler(compiler)
|
||||
add_compiler(compilers[(7.0,32)])
|
||||
#add_compiler(compilers[(7.1,64)])
|
||||
|
||||
with open('build_deps.cmd', 'w') as f:
|
||||
f.write("\n".join(script))
|
||||
|
|
|
@ -36,15 +36,25 @@ libs = { 'zlib':{
|
|||
'hash': 'sha1:7ff1a5b721ca719760ba6eb4ec6f38d5e65381cf',
|
||||
'dir': 'lcms2-2.7',
|
||||
},
|
||||
'tcl':{
|
||||
'tcl-8.5':{
|
||||
'url':SF_MIRROR+'/project/tcl/Tcl/8.5.13/tcl8513-src.zip',
|
||||
'hash': 'sha1:3e01585c91293c532a3cd594ec59deca92153a5e',
|
||||
'dir': '',
|
||||
},
|
||||
'tk':{
|
||||
'tk-8.5':{
|
||||
'url':SF_MIRROR+'/project/tcl/Tcl/8.5.13/tk8513-src.zip',
|
||||
'hash': 'sha1:23a1d7ddd416e11e06dfdb9f86111d4bab9420b4',
|
||||
'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',
|
||||
|
|
Loading…
Reference in New Issue
Block a user