mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-24 17:06:16 +03:00
build pillow for all the pythons
This commit is contained in:
parent
95b79926de
commit
1ad678a5ea
55
winbuild/build.py
Normal file
55
winbuild/build.py
Normal file
|
@ -0,0 +1,55 @@
|
|||
#/usr/bin/env python34
|
||||
|
||||
from config import *
|
||||
|
||||
def setup_vms():
|
||||
ret = []
|
||||
for py in pythons.keys():
|
||||
for arch in ('', 'x64'):
|
||||
ret.append("virtualenv -p c:/Python%s%s/python.exe --clear %s%s%s" %
|
||||
(py, arch, VIRT_BASE, py, arch))
|
||||
return "\n".join(ret)
|
||||
|
||||
def header(op):
|
||||
return r"""
|
||||
setlocal
|
||||
set MPLSRC=%%~dp0\..
|
||||
set INCLIB=%%~dp0\depends
|
||||
set BLDOPT=%s
|
||||
cd /D %%MPLSRC%%
|
||||
""" % (op)
|
||||
|
||||
def footer():
|
||||
return """endlocal
|
||||
exit
|
||||
"""
|
||||
|
||||
def build_one(py_ver, compiler):
|
||||
args = {}
|
||||
args.update(compiler)
|
||||
args['py_ver'] = py_ver
|
||||
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
|
||||
|
||||
setlocal
|
||||
set LIB=%%LIB%%;C:\Python%(py_ver)s\tcl
|
||||
rd /q /s build
|
||||
call c:\vp\%(py_ver)s\Scripts\python.exe setup.py %%BLDOPT%%
|
||||
endlocal
|
||||
|
||||
endlocal
|
||||
""" % args
|
||||
|
||||
script = [setup_vms(), header('install')]
|
||||
for py_version, compiler_version in pythons.items():
|
||||
script.append(build_one(py_version, compilers[(compiler_version, 32)]))
|
||||
script.append(build_one("%sx64" %py_version, compilers[(compiler_version, 64)]))
|
||||
script.append(footer())
|
||||
|
||||
with open('build_pillows.cmd', 'w') as f:
|
||||
f.write("\n".join(script))
|
||||
|
Loading…
Reference in New Issue
Block a user