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(
            boost_path, vc_version.replace(".", ""),
Esempio n. 2
0
                    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(
Esempio n. 3
0
        .depend(b2.B2(name="Static").arguments(["address-model={}".format("64" if config['architecture'] == 'x86_64' else "32"),
                                                "-a",
                                                "--user-config={}".format(os.path.join(config['paths']['build'],
                                                                                       "boost_git", "user-config.jam")),
                                                "-j {}".format(config['num_jobs']),

                                                "toolset=msvc-" + vc_version,

                                                "link=static",
                                                "runtime-link=shared",
                                                "include={}".format(os.path.join(config['paths']['build'], "icu", "dist", "include", "unicode")),
                                                "-sICU_PATH={}".format(os.path.join(config['paths']['build'], "icu", "dist")),
                                                "-sHAVE_ICU=1",
                                                ] + ["--with-{0}".format(component) for component in boost_components])
                    .depend(build.Run(r"bootstrap.bat",working_directory=lambda: os.path.join(config["paths"]["build"], "boost_git")))
                        .depend(Patch.CreateFile("user-config.jam",
                                                 lambda: config_template.format(
                                         python_version,
                                         os.path.join(python_path, "PCBuild",
                                                      "{}".format("" if config['architecture'] == 'x86' else "amd64")).replace("\\",'/'),
                                         python_path,
                                         "64" if config['architecture'] == "x86_64" else "32")
                                                 ))
                    .depend(init_repo)
        #            .depend(sourceforge.Release("boost",
        #                                        "boost/{0}/boost_{1}.tar.bz2".format(boost_version,
        #                                                                             boost_version.replace(".", "_")),
        #                                        tree_depth=1))
                    ).depend("icu").depend("Python")
                )