2015-06-11 23:11:26 +03:00
|
|
|
import os
|
|
|
|
|
2014-04-05 00:00:52 +04:00
|
|
|
SF_MIRROR = 'http://iweb.dl.sourceforge.net'
|
|
|
|
|
2015-06-20 06:43:14 +03:00
|
|
|
pythons = {#'26': 7,
|
|
|
|
'27': 7,
|
|
|
|
#'32': 7,
|
|
|
|
'33': 7.1,
|
|
|
|
'34': 7.1}
|
2014-04-05 00:00:52 +04:00
|
|
|
|
|
|
|
VIRT_BASE = "c:/vp/"
|
2015-06-20 06:43:14 +03:00
|
|
|
X64_EXT = os.environ.get('X64_EXT', "x64")
|
2014-04-05 00:00:52 +04:00
|
|
|
|
2015-06-20 06:43:14 +03:00
|
|
|
libs = {'zlib': {
|
|
|
|
'url': 'http://zlib.net/zlib128.zip',
|
2014-04-05 00:00:52 +04:00
|
|
|
'hash': 'md5:126f8676442ffbd97884eb4d6f32afb4',
|
|
|
|
'dir': 'zlib-1.2.8',
|
|
|
|
},
|
2015-06-20 06:43:14 +03:00
|
|
|
'jpeg': {
|
|
|
|
'url': 'http://www.ijg.org/files/jpegsr9a.zip',
|
|
|
|
'hash': 'md5:a34f3c82760270ee1e1885b15b90a72e', # not found - generated by wiredfool
|
2014-04-05 00:00:52 +04:00
|
|
|
'dir': 'jpeg-9a',
|
|
|
|
},
|
2015-06-20 06:43:14 +03:00
|
|
|
'tiff': {
|
2015-06-26 04:01:40 +03:00
|
|
|
'url': 'ftp://ftp.remotesensing.org/pub/libtiff/tiff-4.0.4.zip',
|
2015-06-26 20:08:40 +03:00
|
|
|
'hash': 'md5:8f538a34156188f9a8dcddb679c65d1e',
|
2015-06-26 04:01:40 +03:00
|
|
|
'dir': 'tiff-4.0.4',
|
2014-04-05 00:00:52 +04:00
|
|
|
},
|
2015-06-20 06:43:14 +03:00
|
|
|
'freetype': {
|
|
|
|
'url': 'http://download.savannah.gnu.org/releases/freetype/freetype-2.6.tar.gz',
|
|
|
|
'hash': 'md5:1d733ea6c1b7b3df38169fbdbec47d2b',
|
|
|
|
'dir': 'freetype-2.6',
|
2014-04-05 00:00:52 +04:00
|
|
|
},
|
2015-06-20 06:43:14 +03:00
|
|
|
'lcms': {
|
|
|
|
'url': SF_MIRROR+'/project/lcms/lcms/2.7/lcms2-2.7.zip',
|
2015-06-19 04:26:34 +03:00
|
|
|
'hash': 'sha1:7ff1a5b721ca719760ba6eb4ec6f38d5e65381cf',
|
|
|
|
'dir': 'lcms2-2.7',
|
2014-04-05 00:00:52 +04:00
|
|
|
},
|
2015-06-20 06:43:14 +03:00
|
|
|
'tcl-8.5': {
|
2015-06-26 04:01:40 +03:00
|
|
|
'url': SF_MIRROR+'/project/tcl/Tcl/8.5.18/tcl8518-src.zip',
|
|
|
|
'hash': 'sha1:4c2aed9043088c630a4c795265e2738ef1b4db3b',
|
2014-04-05 00:00:52 +04:00
|
|
|
'dir': '',
|
|
|
|
},
|
2015-06-20 06:43:14 +03:00
|
|
|
'tk-8.5': {
|
2015-06-26 04:01:40 +03:00
|
|
|
'url': SF_MIRROR+'/project/tcl/Tcl/8.5.18/tk8518-src.zip',
|
|
|
|
'hash': 'sha1:273f55148777413774aa722ecad25cabda1e31ae',
|
2014-04-05 00:00:52 +04:00
|
|
|
'dir': '',
|
2015-06-26 20:08:40 +03:00
|
|
|
'version':'8.5.18',
|
2015-06-20 02:27:42 +03:00
|
|
|
},
|
2015-06-20 06:43:14 +03:00
|
|
|
'tcl-8.6': {
|
|
|
|
'url': SF_MIRROR+'/project/tcl/Tcl/8.6.4/tcl864-src.zip',
|
2015-06-20 02:27:42 +03:00
|
|
|
'hash': 'md5:35748d2fc61e08a2fdb23b85c6f8c4a0',
|
|
|
|
'dir': '',
|
|
|
|
},
|
2015-06-20 06:43:14 +03:00
|
|
|
'tk-8.6': {
|
|
|
|
'url': SF_MIRROR+'/project/tcl/Tcl/8.6.4/tk864-src.zip',
|
2015-06-20 02:27:42 +03:00
|
|
|
'hash': 'md5:111d45061a69e7f5250b6ec8ca7c4f35',
|
|
|
|
'dir': '',
|
2015-06-26 20:08:40 +03:00
|
|
|
'version':'8.6.4',
|
2014-04-05 00:00:52 +04:00
|
|
|
},
|
2015-06-20 06:43:14 +03:00
|
|
|
'webp': {
|
|
|
|
'url': 'http://downloads.webmproject.org/releases/webp/libwebp-0.4.3.tar.gz',
|
|
|
|
'hash': 'sha1:1c307a61c4d0018620b4ba9a58e8f48a8d6640ef',
|
|
|
|
'dir': 'libwebp-0.4.3',
|
2015-06-26 20:08:40 +03:00
|
|
|
|
2014-04-05 00:00:52 +04:00
|
|
|
},
|
2015-06-20 06:43:14 +03:00
|
|
|
'openjpeg': {
|
|
|
|
'url': SF_MIRROR+'/project/openjpeg/openjpeg/2.1.0/openjpeg-2.1.0.tar.gz',
|
|
|
|
'hash': 'md5:f6419fcc233df84f9a81eb36633c6db6',
|
|
|
|
'dir': 'openjpeg-2.1.0',
|
2014-08-23 03:15:37 +04:00
|
|
|
},
|
|
|
|
|
2015-06-26 20:08:40 +03:00
|
|
|
}
|
2014-06-11 10:36:03 +04:00
|
|
|
|
|
|
|
bin_libs = {
|
2015-06-20 06:43:14 +03:00
|
|
|
'openjpeg': {
|
|
|
|
'filename': 'openjpeg-2.0.0-win32-x86.zip',
|
|
|
|
'hash': 'sha1:xxx',
|
|
|
|
'version': '2.0'
|
|
|
|
},
|
2014-04-05 00:00:52 +04:00
|
|
|
}
|
|
|
|
|
2015-06-20 06:43:14 +03:00
|
|
|
compilers = {(7, 64): {
|
|
|
|
'env_version': 'v7.0',
|
|
|
|
'vc_version': '2008',
|
2014-08-23 08:36:28 +04:00
|
|
|
'env_flags': '/x64 /xp',
|
2014-04-05 00:00:52 +04:00
|
|
|
'inc_dir': 'msvcr90-x64',
|
2015-06-19 07:43:11 +03:00
|
|
|
'platform': 'x64',
|
|
|
|
'webp_platform': 'x64',
|
2014-04-05 00:00:52 +04:00
|
|
|
},
|
2015-06-20 06:43:14 +03:00
|
|
|
(7, 32): {
|
|
|
|
'env_version': 'v7.0',
|
|
|
|
'vc_version': '2008',
|
2014-04-05 00:00:52 +04:00
|
|
|
'env_flags': '/x86 /xp',
|
|
|
|
'inc_dir': 'msvcr90-x32',
|
2015-06-19 07:43:11 +03:00
|
|
|
'platform': 'Win32',
|
|
|
|
'webp_platform': 'x86',
|
2014-04-05 00:00:52 +04:00
|
|
|
},
|
|
|
|
|
2015-06-20 06:43:14 +03:00
|
|
|
(7.1, 64): {
|
|
|
|
'env_version': 'v7.1',
|
|
|
|
'vc_version': '2010',
|
2014-04-05 00:00:52 +04:00
|
|
|
'env_flags': '/x64 /vista',
|
|
|
|
'inc_dir': 'msvcr10-x64',
|
|
|
|
'platform': 'x64',
|
2015-06-19 07:43:11 +03:00
|
|
|
'webp_platform': 'x64',
|
2014-04-05 00:00:52 +04:00
|
|
|
},
|
2015-06-20 06:43:14 +03:00
|
|
|
(7.1, 32): {
|
|
|
|
'env_version': 'v7.1',
|
|
|
|
'vc_version': '2010',
|
2014-08-23 08:36:28 +04:00
|
|
|
'env_flags': '/x86 /vista',
|
2014-04-05 00:00:52 +04:00
|
|
|
'inc_dir': 'msvcr10-x32',
|
|
|
|
'platform': 'Win32',
|
2015-06-19 07:43:11 +03:00
|
|
|
'webp_platform': 'x86',
|
2014-04-05 00:00:52 +04:00
|
|
|
},
|
|
|
|
|
|
|
|
}
|
2015-06-11 23:11:26 +03:00
|
|
|
|
|
|
|
|
|
|
|
def pyversion_fromEnv():
|
|
|
|
py = os.environ['PYTHON']
|
|
|
|
|
|
|
|
py_version = '27'
|
2015-06-20 04:34:34 +03:00
|
|
|
for k in pythons.keys():
|
2015-06-11 23:11:26 +03:00
|
|
|
if k in py:
|
|
|
|
py_version = k
|
|
|
|
break
|
|
|
|
|
|
|
|
if '64' in py:
|
2015-06-16 03:49:25 +03:00
|
|
|
py_version = '%s%s' % (py_version, X64_EXT)
|
2015-06-11 23:11:26 +03:00
|
|
|
|
|
|
|
return py_version
|
|
|
|
|
2015-06-20 06:43:14 +03:00
|
|
|
|
2015-06-11 23:11:26 +03:00
|
|
|
def compiler_fromEnv():
|
|
|
|
py = os.environ['PYTHON']
|
|
|
|
|
2015-06-20 06:43:14 +03:00
|
|
|
for k, v in pythons.items():
|
2015-06-11 23:11:26 +03:00
|
|
|
if k in py:
|
|
|
|
compiler_version = v
|
|
|
|
break
|
|
|
|
|
|
|
|
bit = 32
|
|
|
|
if '64' in py:
|
|
|
|
bit = 64
|
|
|
|
|
|
|
|
return compilers[(compiler_version, bit)]
|