コード例 #1
0
    except OSError as exception:
        if exception.errno != errno.EEXIST:
            raise


def install(context):
    make_sure_path_exists(os.path.join(config["paths"]["install"], "libs"))
    for f in glob(os.path.join(context['build_path'], "*.lib")):
        shutil.copy(f, os.path.join(config["paths"]["install"], "libs"))
    return True


Project("Udis86") \
    .depend(build.Execute(install)
            .depend((build.CPP().type(build.STATIC_LIB)
                     .sources("libudis86", ["libudis86/decode.c",
                                            "libudis86/itab.c",
                                            "libudis86/syn.c",
                                            "libudis86/syn-att.c",
                                            "libudis86/syn-intel.c",
                                            "libudis86/udis86.c"])
                     .custom("libudis86/itab.c",
                             cmd="{python} scripts/ud_itab.py docs/x86/optable.xml"
                                 " libudis86".format(**config["__environment"]))
                     )
                    .depend(sourceforge.Release("udis86", "udis86/{0}/udis86-{0}.{1}.tar.gz".format(udis_version,
                                                                                                    udis_version_minor),
                                                tree_depth=1))
                    )
            )
コード例 #2
0
                     "--confirm-license",
                     "-b", bp,
                     "-d", os.path.join(bp, "Lib", "site-packages"),
                     "-v", os.path.join(bp, "sip", "PyQt5"),
                     "--sip-incdir", os.path.join(bp, "Include"),
                     "--spec=win32-msvc"],
                    env=pyqt5_env(),
                    cwd=self._context["build_path"],
                    shell=True,
                    stdout=sout, stderr=serr)
                proc.communicate()
                if proc.returncode != 0:
                    logging.error("failed to run pyqt configure.py (returncode %s), see %s and %s",
                                  proc.returncode, soutpath, serrpath)
                    return False

        return True


Project("PyQt5") \
    .depend(build.Execute(copy_pyd)
            .depend(Patch.Copy([os.path.join(qt_inst_path(), "bin", "Qt5Core.dll"),
                                os.path.join(qt_inst_path(), "bin", "Qt5Xml.dll")],
                               doclambda(lambda: python.python['build_path'], "python path"))
                    .depend(build.Make(environment=lazy.Evaluate(pyqt5_env)).install()
                            .depend(PyQt5Configure()
                                    .depend("sip")
                                    .depend("Qt5")
                                    .depend(sourceforge.Release("pyqt", "PyQt5/PyQt-{0}/PyQt5_gpl-{0}.zip"
                                                                .format(pyqt_version), tree_depth=1))))))
コード例 #3
0
                    proc = subprocess.Popen([res, "runConfigureICU", "Cygwin/MSVC", "--prefix"
                                            , "{}".format(current_dir_cygwin)],
                             env=icu_environment(),
                             cwd=os.path.join(self._context["build_path"], "source"),
                             shell=True,
                             stdout=sout, stderr=serr)
                proc.communicate()
                if proc.returncode != 0:
                    logging.error("failed to run icu runConfigureICU (returncode %s), see %s and %s",
                                  proc.returncode, soutpath, serrpath)
                    return False

            return True


Convert_icu = build.Run(r"dos2unix -f configure",
                        environment=icu_environment(),
                        working_directory=lambda: os.path.join(config["paths"]["build"], "icu", "source"))

icu = Project('icu') \
        .depend(build_icu
                .depend(ConfigureIcu()
                        .depend(Convert_icu
                                .depend(Patch.Replace("source/io/ufile.cpp",
                                                      "#if U_PLATFORM_USES_ONLY_WIN32_API",
                                                      "#if U_PLATFORM_USES_ONLY_WIN32_API && _MSC_VER < 1900")
                                        .depend(sourceforge.Release("icu","ICU4C/{0}.{1}/icu4c-{0}_{1}-src.tgz"
                                                                    .format(icu_version,icu_version_minor),tree_depth=1)
                                                                            .set_destination("icu"))))))\
        .depend("cygwin")
コード例 #4
0
                                                        reltarget="Release",
                                                        project_AdditionalParams=[
                                                            "/p:bz2Dir={}".format(os.path.join(build_path, "bzip2")),
                                                            "/p:zlibDir={}".format(os.path.join(build_path, "zlib-{}".format(config['zlib_version']))),
                                                            "/p:opensslIncludeDir={}".format(os.path.join(build_path, "openssl-{}".format(openssl_version), "include")),
                                                            "/p:opensslOutDir={}".format(os.path.join(build_path, "openssl-{}".format(openssl_version))),
                                                            "/p:libffiIncludeDir={}".format(os.path.join(build_path, "libffi", bitness(), "include")),
                                                            "/p:libffiOutDir={}".format(os.path.join(build_path, "libffi", bitness())),
                                                        ]
                                                        )
                                        .depend(build.Execute(patch_openssl_props)
                                                .depend(build.Run(upgrade_args, name="upgrade python project")
                                                        .depend(github.Source("python", "cpython", "v{}{}"
                                                                              .format(config['python_version'],
                                                                                      config['python_version_minor'])
                                                                              , shallowclone=True)
                                                        .set_destination("python-{}".format(python_version + python_version_minor))
                                                                .depend(sourceforge.Release("bzip2","bzip2-{0}.tar.gz"
                                                                                            .format(bzip2_version), tree_depth=1)
                                                                        .set_destination("bzip2")
                                                                        )
                                                                )
                                                        )
                                                )
                                        .depend("openssl")
                                        .depend("libffi")
                                        )
                                )
                        )
                )
コード例 #5
0
                    os.path.join(bp, "sip"), "-e",
                    os.path.join(bp, "include")
                ],
                             env=config["__environment"],
                             cwd=self._context["build_path"],
                             shell=True,
                             stdout=sout,
                             stderr=serr)
                proc.communicate()
                if proc.returncode != 0:
                    logging.error(
                        "failed to run sip configure.py (returncode %s), see %s and %s",
                        proc.returncode, soutpath, serrpath)
                    return False

        return True


Project('sip') \
    .depend(build.Execute(copy_pyd)
            .depend(build.Make(environment=sip_environment()).install()
                    .depend(SipConfigure()
                            .depend("Python")
                            .depend(sourceforge.Release("pyqt",
                                                        "sip/sip-{0}/sip-{0}.zip".format(sip_version),
                                                        1)
                                    )
                            )
                    )
            )
コード例 #6
0
                                      "-platform", platform,
                                      "-debug-and-release", "-force-debug-info",
                                      "-opensource", "-confirm-license", "-icu",
                                      "-mp", "-no-compile-examples",
                                      "-no-angle", "-opengl", "desktop",
                                      "-ssl", "-openssl-linked",
                                      "OPENSSL_LIBS=\"-lssleay32MD -llibeay32MD -lgdi32 -lUser32\"",
                                      "-prefix", qt_inst_path] \
                                     + list(itertools.chain(*[("-skip", s) for s in skip_list])) \
                                     + list(itertools.chain(*[("-nomake", n) for n in nomake_list])))

    jom = Project("jom") \
        .depend(urldownload.URLDownload("http://download.qt.io/official_releases/jom/jom.zip"))

    grep = Project('grep') \
        .depend(sourceforge.Release("gnuwin32", "grep/{0}/grep-{0}-bin.zip".format(grep_version))
                .set_destination("grep"))\
        .depend(sourceforge.Release("gnuwin32", "grep/{0}/grep-{0}-dep.zip".format(grep_version))
                .set_destination("grep"))

    flex = Project('flex') \
        .depend(sourceforge.Release("winflexbison", "win_flex_bison-latest.zip"))

    def webkit_env():
        result = config['__environment'].copy()

        result['Path'] = ";".join([
            os.path.join(grep['build_path'], "bin"),
            flex['build_path'],
            os.path.dirname(config['paths']['ruby']),
            os.path.dirname(config['paths']['perl']),
            os.path.join(config["paths"]["build"], "qt5", "bin"),
コード例 #7
0
        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(".", ""),
            "x64" if config['architecture'] == "x86_64" else "x86",
            "_".join(boost_version.split("_")[:-1]))),
        os.path.join(config["paths"]["install"], "bin"))
コード例 #8
0
ファイル: pyqt5.py プロジェクト: ozoak/modorganizer-umbrella
                proc.communicate()
                if proc.returncode != 0:
                    logging.error(
                        "failed to run pyqt configure.py (returncode %s), see %s and %s",
                        proc.returncode, soutpath, serrpath)
                    return False

        return True


Project("PyQt5") \
    .depend(build.Execute(copy_pyd)
            .depend(Patch.Copy([os.path.join(qt5.qt_inst_path, "bin", "Qt5Core.dll"),
                                os.path.join(qt5.qt_inst_path, "bin", "Qt5Xml.dll"),
                                os.path.join(config['paths']['build'], "icu" , "dist", "lib", "icudt{}.dll".format(icu_version)),
                                os.path.join(config['paths']['build'], "icu", "dist", "lib", "icuin{}.dll".format(icu_version)),
                                os.path.join(config['paths']['build'], "icu", "dist", "lib", "icuuc{}.dll".format(icu_version))],
                               doclambda(lambda: python.python['build_path'], "python path"))
                    .depend(build.Make(environment=lazy.Evaluate(pyqt5_env)).install()
                            .depend(PyQt5Configure()
                                    .depend("sip")
                                    .depend("Qt5")
                                    .depend(sourceforge.Release("pyqt",
                                                                "PyQt5/PyQt-{0}.{1}/PyQt5_gpl-{0}.{1}.zip"
                                                                .format(qt5.qt_version, qt5.qt_version_minor),
                                                                tree_depth=1))
                                    )
                            )
                    )
            )