コード例 #1
0
                    vc_version, config["python_version"].replace(".", ""),
                    vc_version.replace(".", ""),
                    "x64" if config['architecture'] == "x86_64" else "x86",
                    "_".join(boost_version.split(".")[:-1]))),
            os.path.join(config["paths"]["install"], "bin"))
        boost.depend(boost_stage)

else:
    boost_prepare = Project("boost_prepare") \
        .depend(b2.Bootstrap()
                .depend(Patch.CreateFile(user_config_jam,
                                         lambda: config_template.format(
                                             python_version,
                                             os.path.join(
                                                python.python['build_path'], "PCBuild",
                                                "{}".format("" if config['architecture'] == 'x86' else "amd64"))
                                             .replace("\\", '/'),
                                             os.path.join(python.python['build_path']).replace("\\", '/'),
                                             "64" if config['architecture'] == "x86_64" else "32"))
                        .depend(urldownload.URLDownload("https://dl.bintray.com/boostorg/release/{}/source/boost_{}.7z"
                                                        .format(boost_version,boost_tag_version.replace(".", "_"))
                                                         , tree_depth=1)
                                .set_destination("boost_{}".format(boost_tag_version.replace(".", "_"))))))

    if config['architecture'] == 'x86_64':
        # This is a convient way to make each boost flavors we build have these dependencies:
        boost_prepare.depend("Python")

    boost = Project("boost")

    if config['architecture'] == 'x86_64':
        boost_stage = Patch.Copy(
コード例 #2
0

def patchboost(context):
    try:
        return True
    except OSError:
        return False


boost_prepare = Project("boost_prepare") \
    .depend(b2.Bootstrap() \
        .depend(Patch.CreateFile(user_config_jam,
                                lambda: config_template.format(python_version,
                                os.path.join(python.python['build_path'], "PCBuild",
                                "{}".format("" if config['architecture'] == 'x86' else "amd64")).replace("\\",'/'),
                                    os.path.join(python.python['build_path']).replace("\\", '/'),
                                    "64" if config['architecture'] == "x86_64" else "32")) \
            .depend(build.Execute(patchboost)
                .depend(sourceforge.Release("boost", "boost/{0}/boost_{1}.tar.bz2"
                                    .format(boost_version, boost_version.replace(".", "_")),tree_depth=1)
                                    .set_destination("boost_{}".format(boost_version))))))

if config['architecture'] == 'x86_64':
    # This is a convient way to make each boost flavors we build have these dependencies:
    boost_prepare.depend("Python")

boost = Project("boost")

if config['architecture'] == 'x86_64':
    boost_stage = Patch.Copy(
        os.path.join("{}/stage/lib/boost_python-vc{}-mt-{}-{}.dll".format(