Example #1
0
def sip():
    sip_path_parent, sip_dir = os.path.split(os.path.abspath(sip_path))

    # Get SIP
    needs_build = True
    with cd(sip_path_parent):
        if not isdir(sip_dir):
            inform('Could not find SIP directory at %r, downloading...' %
                   sip_path)
            git.run(['clone', SIP_GIT_REPO, sip_dir])

            if SIP_GIT_BRANCH != 'master':
                with cd(sip_dir):
                    git.run([
                        'checkout', '-b', SIP_GIT_BRANCH,
                        SIP_GIT_REMOTE + '/' + SIP_GIT_BRANCH
                    ])
        else:
            pass


#            inform('SIP found at %r, updating...' % sip_path)
#            with cd(sip_dir):
#                git.run(['pull'])
#                if not git.sha_changed() and isfile(sip_exe) and isfile(sip_pyd):
#                    inform('skipping SIP build')
#                    needs_build = False

# Build SIP
    if needs_build and 'nosip' not in sys.argv:
        with cd(sip_path):
            if not sys.platform.startswith("win"):
                dpy([
                    'configure.py', '-b', 'sipgen', '-d', 'siplib', '-e',
                    'siplib', '-v', 'siplib'
                ])
                # sip sets CC and CXX directly to cc and c++ rather than pulling the values
                # from the environment, which we don't want if we're forcing a 32-bit build
                # by using gcc 4.0.
                env = os.environ
                run([
                    'make',
                    'CC=%s' % env['CC'],
                    'CXX=%s' % env['CXX'],
                    'LINK=%s' % env['CXX']
                ])

            else:
                dpy(['setup.py', 'build'])

    assert isfile(sip_exe), "setup.py did not create %s" % sip_exe

    if sys.platform.startswith("win"):
        from buildutil import copy_different, DEPS_DIR
        copy_different(sip_pyd, DEPS_DIR)
        copy_different(sip_pdb, DEPS_DIR)
Example #2
0
def build():
    with cd(thisdir):
        lzma_dir = lzma_sdk.get()

        if not isdir(ppmd7_dir):
            git.run(["clone", ppmd7_git_url])
            assert isdir(ppmd7_dir)

        with cd(ppmd7_dir):
            libname = "ppmd7"
            config = "Release" if not DEBUG else "Debug"
            run(["vcbuild", "libppmd7.sln", "%s|Win32" % config])
            for ext in (".dll", ".pdb"):
                copy_different(os.path.join(config, libname + ext), DEPS_DIR)
Example #3
0
def build():
    with cd(thisdir):
        lzma_dir = lzma_sdk.get()

        if not isdir(ppmd7_dir):
            git.run(['clone', ppmd7_git_url])
            assert isdir(ppmd7_dir)

        with cd(ppmd7_dir):
            libname = 'ppmd7'
            config = 'Release' if not DEBUG else 'Debug'
            run(['vcbuild', 'libppmd7.sln', '%s|Win32' % config])
            for ext in ('.dll', '.pdb'):
                copy_different(os.path.join(config, libname + ext), DEPS_DIR)
Example #4
0
def wxpy(rebuild = False, branch="master"):
    wxpy_path_parent, wxpy_dir = os.path.split(os.path.abspath(wxpy_path))

    # must have wx and webkit directories
    wx_dir = buildDirs.wxWidgetsDir
    webkit_dir = buildDirs.wxWebKitDir

    sip_dir = os.path.abspath(sip_path)

    with cd(wxpy_path_parent):
        if not isdir(wxpy_dir):
            inform('Could not find wxpy directory at %r, downloading...' % wxpy_path)
            git.run(['clone', WXPY_GIT_REPO, wxpy_dir])
            if branch != "master":
                with cd(wxpy_dir):
                    git.run(['checkout', '-b', branch, 'origin/%s' % branch])

        # else:
        #     with cd(wxpy_dir):
        #         git.run(['pull'])

        # wipe out the "wxpy/build" directory if we're rebuilding

        if rebuild:
            inform("rebuilding...removing old build directory")
            with cd(wxpy_dir):
                if os.path.isdir('build'):
                    shutil.rmtree('build')

        sip_pyd_loc = pathjoin(sip_dir, 'siplib')

        sip_exe = 'sip%s.%s' % (DEBUG_POSTFIX, py_ext)
        assert os.path.isfile(pathjoin(sip_pyd_loc, sip_exe)), \
            "could not find %s at %r" % (sip_exe, sip_pyd_loc)
        pp = os.pathsep.join([sip_dir, sip_pyd_loc])

        os.environ['PYTHONPATH'] = pp

        print 'PYTHONPATH=' +  pp

        with cd(wxpy_dir):
            dpy(['setup.py',
                 '--wx=%s' % wx_dir,
                 '--webkit=%s' % webkit_dir]
                + sys.argv[1:])


    install_wxpy()
Example #5
0
def wxpy(rebuild=False, branch="master"):
    wxpy_path_parent, wxpy_dir = os.path.split(os.path.abspath(wxpy_path))

    # must have wx and webkit directories
    wx_dir = buildDirs.wxWidgetsDir
    webkit_dir = buildDirs.wxWebKitDir

    sip_dir = os.path.abspath(sip_path)

    with cd(wxpy_path_parent):
        if not isdir(wxpy_dir):
            inform('Could not find wxpy directory at %r, downloading...' %
                   wxpy_path)
            git.run(['clone', WXPY_GIT_REPO, wxpy_dir])
            if branch != "master":
                with cd(wxpy_dir):
                    git.run(['checkout', '-b', branch, 'origin/%s' % branch])

        # else:
        #     with cd(wxpy_dir):
        #         git.run(['pull'])

        # wipe out the "wxpy/build" directory if we're rebuilding

        if rebuild:
            inform("rebuilding...removing old build directory")
            with cd(wxpy_dir):
                if os.path.isdir('build'):
                    shutil.rmtree('build')

        sip_pyd_loc = pathjoin(sip_dir, 'siplib')

        sip_exe = 'sip%s.%s' % (DEBUG_POSTFIX, py_ext)
        assert os.path.isfile(pathjoin(sip_pyd_loc, sip_exe)), \
            "could not find %s at %r" % (sip_exe, sip_pyd_loc)
        pp = os.pathsep.join([sip_dir, sip_pyd_loc])

        os.environ['PYTHONPATH'] = pp

        print 'PYTHONPATH=' + pp

        with cd(wxpy_dir):
            dpy(['setup.py',
                 '--wx=%s' % wx_dir,
                 '--webkit=%s' % webkit_dir] + sys.argv[1:])

    install_wxpy()
Example #6
0
def sip():
    sip_path_parent, sip_dir = os.path.split(os.path.abspath(sip_path))

    # Get SIP
    needs_build = True
    with cd(sip_path_parent):
        if not isdir(sip_dir):
            inform('Could not find SIP directory at %r, downloading...' % sip_path)
            git.run(['clone', SIP_GIT_REPO, sip_dir])

            if SIP_GIT_BRANCH != 'master':
                with cd(sip_dir):
                    git.run(['checkout', '-b', SIP_GIT_BRANCH, SIP_GIT_REMOTE + '/' + SIP_GIT_BRANCH])
        else:
            pass
#            inform('SIP found at %r, updating...' % sip_path)
#            with cd(sip_dir):
#                git.run(['pull'])
#                if not git.sha_changed() and isfile(sip_exe) and isfile(sip_pyd):
#                    inform('skipping SIP build')
#                    needs_build = False

    # Build SIP
    if needs_build and 'nosip' not in sys.argv:
        with cd(sip_path):
            if not sys.platform.startswith("win"):
                dpy(['configure.py', '-b', 'sipgen', '-d', 'siplib', '-e', 'siplib', '-v', 'siplib'])
                # sip sets CC and CXX directly to cc and c++ rather than pulling the values
                # from the environment, which we don't want if we're forcing a 32-bit build
                # by using gcc 4.0.
                env = os.environ
                run(['make', 'CC=%s' % env['CC'],
                             'CXX=%s' % env['CXX'],
                             'LINK=%s' % env['CXX']])

            else:
                dpy(['setup.py', 'build'])

    assert isfile(sip_exe), "setup.py did not create %s" % sip_exe

    if sys.platform.startswith("win"):
        from buildutil import copy_different, DEPS_DIR
        copy_different(sip_pyd, DEPS_DIR)
        copy_different(sip_pdb, DEPS_DIR)
Example #7
0
def checkout():
    if isdir(WEBKITDIR):
        inform('skipping checkout, %s already exists' % WEBKITDIR)
    else:
        inform('cloning WebKit')

        makedirs(WEBKITDIR)
        with cd(WEBKITDIR):
            git.run(['init'])

            # turn off auto CRLF conversion, so that cygwin bash
            # doesn't complain about line endings
            git.run(['config', 'core.autocrlf', 'false'])

            # Add our remote source
            git.run(['remote', 'add', WEBKIT_GIT_REMOTE, WEBKIT_GIT_REPO])
            git.run(['fetch', WEBKIT_GIT_REMOTE, '--depth', '1'])

            # checkout a local tracking branch of the remote branch we're interested in
            with timed():
                git.run(['checkout', '-b', WEBKIT_GIT_BRANCH, WEBKIT_GIT_REMOTE + '/' + WEBKIT_GIT_BRANCH])
Example #8
0
def checkout():
    if isdir(WEBKITDIR):
        inform('skipping checkout, %s already exists' % WEBKITDIR)
    else:
        inform('cloning WebKit')

        makedirs(WEBKITDIR)
        with cd(WEBKITDIR):
            git.run(['init'])

            # turn off auto CRLF conversion, so that cygwin bash
            # doesn't complain about line endings
            git.run(['config', 'core.autocrlf', 'false'])

            # Add our remote source
            git.run(['remote', 'add', WEBKIT_GIT_REMOTE, WEBKIT_GIT_REPO])
            git.run(['fetch', WEBKIT_GIT_REMOTE, '--depth', '1'])

            # checkout a local tracking branch of the remote branch we're interested in
            with timed():
                git.run([
                    'checkout', '-b', WEBKIT_GIT_BRANCH,
                    WEBKIT_GIT_REMOTE + '/' + WEBKIT_GIT_BRANCH
                ])
Example #9
0
def checkout():
    if exists(WXDIR):
        inform('already exists: %s' % WXDIR)
    else:
        #inform('checking out wxWebKitBranch-2.8...')
        #run(['svn', 'checkout', WXWIDGETS_28_SVN_DIR, WXDIR])

        inform('cloning wxWebKitBranch-2.8')
        git.run(['clone', WX_GIT_REPO, abspath(WXDIR).replace('\\', '/'), '--depth=1'])
        with cd(WXDIR):
            # don't change newlines
            git.run(['config', 'core.autocrlf', 'false'])

            if WX_GIT_BRANCH != 'master':
                git.run(['fetch', 'origin'])
                # checkout our branch.
                git.run(['checkout', '-b', WX_GIT_BRANCH, 'origin/%s' % WX_GIT_BRANCH])
        assert exists(WXDIR)
Example #10
0
def checkout():
    if exists(WXDIR):
        inform('already exists: %s' % WXDIR)
    else:
        #inform('checking out wxWebKitBranch-2.8...')
        #run(['svn', 'checkout', WXWIDGETS_28_SVN_DIR, WXDIR])

        inform('cloning wxWebKitBranch-2.8')
        git.run([
            'clone', WX_GIT_REPO,
            abspath(WXDIR).replace('\\', '/'), '--depth=1'
        ])
        with cd(WXDIR):
            # don't change newlines
            git.run(['config', 'core.autocrlf', 'false'])

            if WX_GIT_BRANCH != 'master':
                git.run(['fetch', 'origin'])
                # checkout our branch.
                git.run([
                    'checkout', '-b', WX_GIT_BRANCH,
                    'origin/%s' % WX_GIT_BRANCH
                ])
        assert exists(WXDIR)
Example #11
0
def update():
    with cd(WXDIR):
        inform('updating wxWidgets...')
        #run(['svn', 'up'])
        git.run(['checkout', WX_GIT_BRANCH])
        git.run(['pull', 'origin', WX_GIT_BRANCH])
Example #12
0
def update():
    with cd(WXDIR):
        inform('updating wxWidgets...')
        #run(['svn', 'up'])
        git.run(['checkout', WX_GIT_BRANCH])
        git.run(['pull', 'origin', WX_GIT_BRANCH])
Example #13
0
def update():
    print 'skipping webkit update'
    return

    with cd(WEBKITDIR):
        git.run(['pull', WEBKIT_GIT_REMOTE, WEBKIT_GIT_BRANCH])
Example #14
0
def update():
    print 'skipping webkit update'
    return

    with cd(WEBKITDIR):
        git.run(['pull', WEBKIT_GIT_REMOTE, WEBKIT_GIT_BRANCH])