def raw_build_arch(pyver, arch, src_root):
    scipy_verstr = get_scipy_version(src_root)
    bdir = bootstrap_dir(pyver)

    print "Building scipy (version %s) binary for python %s, arch is %s" % \
          (scipy_verstr, get_python_exec(pyver), arch)

    if BUILD_MSI:
        cmd = [get_python_exec(pyver), "setup.py", "build", "-c", "mingw32",
               "bdist_msi"]
    else:
        cmd = [get_python_exec(pyver), "setup.py", "build", "-c", "mingw32",
               "bdist_wininst"]
    build_log = "build-%s-%s.log" % (arch, pyver)
    f = open(build_log, 'w')

    try:
        try:
            st = subprocess.call(cmd, #shell = True,
                            stderr = subprocess.STDOUT, stdout = f,
                            cwd=bdir)
            if st:
                raise RuntimeError("The cmd failed with status %d" % st)
        finally:
            f.close()
    except (subprocess.CalledProcessError, __HOLE__), e:
        print e
        msg = """
There was an error while executing the following command:

    %s

Error was : %s

Look at the build log (%s).""" % (cmd, str(e), build_log)
        raise Exception(msg)

    move_binary(arch, pyver, bdir, scipy_verstr)
dataset/ETHPy150Open scipy/scipy/tools/win32/build_scripts/pavement.py/raw_build_arch