def checkout(): 'Checks out Python source.' run(['svn', 'co', PYTHON_SVN_URL, PYTHON_DIR]) patch_cmd = get_patch_cmd() def banner_msg(s): print print s print def apply_patch(patchfile, strip_prefixes=0): assert os.path.isfile(patchfile) run([patch_cmd, '-p%d' % strip_prefixes, '-i', patchfile]) with cd(PYTHON_DIR): if sys.opts.use_computed_goto: banner_msg('applying computed goto patch') apply_patch('../python26-computed-goto.patch') banner_msg('applying assert mode patch') # this patch restores c assert()s and is made with # svn diff http://svn.python.org/projects/python/trunk@69494 http://svn.python.org/projects/python/trunk@69495 apply_patch('../python26-assert-mode.patch') banner_msg('applying file object close bug patch') # http://bugs.python.org/issue7079 -- remove once we update to a newer version of 2.6 apply_patch('../python26-file-object-close-7079.patch') if USE_DEVENV and sys.opts.intel: banner_msg('applying intel project patch') apply_patch('../vs2008+intel.patch', 3) banner_msg('applying common controls patch') apply_patch('../python-common-controls.patch')
import shutil import os sys.path.append('..') if '..' not in sys.path else None from buildutil import run, cd, tardep, unzip, filerepl, git, inform, timed, DEBUG, copy_different, DEPS_DIR, get_patch_cmd from os import makedirs, environ from os.path import isdir, abspath, exists, join as pathjoin, isfile from constants import TARBALL_URL, WXWEBKIT_GIT_REPO from shutil import move thisdir = abspath(os.path.dirname(__file__)) zlib = tardep('http://symbolsystem.com/build/msvc2008/', 'zlib-1.2.3', '.zip', 629830) patch_cmd = get_patch_cmd() icu = tardep('http://download.icu-project.org/files/icu4c/49.1.2/', 'icu4c-49_1_2-Win32-msvc10', '.zip', 9327628, dirname='icu') # WARNING: if the cURL version changes, make sure that the accompanying patch file (curl_patch) is updated curl = tardep('http://curl.haxx.se/download/', 'curl-7.18.1', '.tar.bz2', 1700966) # this patch hacks cURL to assume all URLS are UTF-8 encoded (which is true when they are coming from webkit, # our only user of cURL. this fixes problems when accessing file:/// paths on the hard disk under non-english # locales). applied only for windows. curl_patch = 'curl_utf8_urls.diff' jpeg = tardep('http://www.ijg.org/files/', 'jpegsrc.v7', '.tar.gz', 960379, dirname = 'jpeg-7') WEBKITDIR = 'WebKit' WEBKIT_GIT_REMOTE = 'mini'
import os.path import shutil import sys sys.path.append('..') if '..' not in sys.path else None from buildutil import run, fatal, inform, cd, wget_cached, untar, unzip, mkdirs, \ filerepl, dpy, copy_different, DEBUG, DEBUG_POSTFIX, get_patch_cmd from os.path import isdir, abspath, join as pathjoin from compiledeps import libxml2_dirname, download_libxml2, libxslt iconv_zipfile, iconv_zipfile_size = 'libiconv-1.9.2-1-lib.zip', 731496 iconv_url = 'http://downloads.sourceforge.net/project/gnuwin32/libiconv/1.9.2-1/' + iconv_zipfile iconv_dirname = iconv_zipfile.replace('.zip', '') patch_cmd = get_patch_cmd() lxml_patch = r'..\patches\lxml.patch' libxml2_patch = r'..\patches\libxml2.patch' from buildutil import DEPS_DIR CLEAN = 'clean' in sys.argv def patch_libxml2_h(*path): # msvc 2008 defines _vsnprintf as an intrinsic (or something like that) # but libxml2 wants to #define it as something else, and things go # boom with cd(*path): with open('win32config.h') as f: