Пример #1
0
    path_segments = [context['build_path'], "PCbuild"]
    if config['architecture'] == "x86_64":
        path_segments.append("amd64")
    for f in glob(os.path.join(*path_segments,"*.lib")):
        shutil.copy(f, os.path.join(path_install, "libs"))
    for f in glob(os.path.join(*path_segments,"*.dll")):
        shutil.copy(f, os.path.join(path_install, "bin"))
    shutil.copy(os.path.join(path_install, "libs", "python{}.lib".format(python_version.replace(".", ""))),
                os.path.join(path_install, "libs", "python3.lib"))
    return True


if config.get('Appveyor_Build', True):
    python = Project("Python") \
        .depend(build.Execute(install)
                .depend(urldownload.URLDownload(
                    config.get('prebuilt_url') + "python-prebuilt-{}.7z"
                    .format(python_version + python_version_minor)).
                        set_destination("python-{}".format(python_version + python_version_minor))))
else:
    python = Project("Python") \
        .depend(build.Execute(install)
                .depend(build.Execute(python_prepare)
                        .depend(msbuild.MSBuild("PCBuild/PCBuild.sln", "python,pyexpat",
                                                project_PlatformToolset=config['vc_platformtoolset'])
                                .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)))))))
Пример #2
0

#if config.get('prefer_binary_dependencies', False):
if False:
    # the python installer registers in windows and prevent further installations. This means this installation
    # would interfere with the rest of the system
    filename = "python-{0}{1}.msi".format(
        python_version, ".amd64" if config['architecture'] == "x86_64" else "")

    python = Project("Python") \
        .depend(build.Run("msiexec /i {0} TARGETDIR={1} /qn ADDLOCAL=DefaultFeature,SharedCRT"
                          .format(os.path.join(config['paths']['download'], filename),
                                  os.path.join(config['paths']['build'], "python-{}".format(python_version))
                                  )
                          )
                .depend(urldownload.URLDownload("{0}/{1}/{2}"
                                                .format(python_url,
                                                        python_version,
                                                        filename
                                                        )
                                                )
                        )
                )
else:

    def install(context):
        make_sure_path_exists(
            os.path.join(config["__build_base_path"], "install", "libs"))
        path_segments = [context['build_path'], "PCbuild"]
        if config['architecture'] == "x86_64":
            path_segments.append("amd64")
        path_segments.append("*.lib")
Пример #3
0
        os.path.join(context["build_path"], "libs"))
    for f in glob(os.path.join(*path_segments, "libffi-*.dll")):
        shutil.copy(f, os.path.join(path_install, "bin"))
    shutil.copy(
        os.path.join(*path_segments,
                     "python{}.pdb".format(python_version.replace(".", ""))),
        os.path.join(path_install, "pdb"))
    for f in glob(os.path.join(*path_segments, "_*.pdb")):
        shutil.copy(f, os.path.join(path_install, "pdb"))
    return True


if config.get('Appveyor_Build', True):
    python = Project("Python") \
        .depend(build.Execute(install)
                .depend(urldownload.URLDownload(
                    config.get('prebuilt_url') + "python-prebuilt-{}.7z"
                    .format(python_version + python_version_minor)).
                        set_destination("python-{}".format(python_version + python_version_minor))))
else:
    Project("libffi").depend(
        github.Source("python",
                      "cpython-bin-deps",
                      "libffi",
                      shallowclone=True).set_destination("libffi"))

    python = Project("Python") \
        .depend(build.Execute(install)
                .depend(build.Execute(python_prepare)
                        .depend(PydCompiler()
                                .depend(msbuild.MSBuild("PCBuild/PCBuild.sln", "python,pythonw,python3dll,select,pyexpat,unicodedata,_queue,_bz2,_ssl,_overlapped",
                                                        project_PlatformToolset=config['vc_platformtoolset'],
Пример #4
0

#if config.get('prefer_binary_dependencies', False):
if False:
    # the python installer registers in windows and prevent further installations. This means this installation
    # would interfere with the rest of the system
    filename = "python-{0}{1}.msi".format(
        python_version, ".amd64" if config['architecture'] == "x86_64" else "")

    python = Project("Python") \
        .depend(build.Run("msiexec /i {0} TARGETDIR={1} /qn ADDLOCAL=DefaultFeature,SharedCRT"
                          .format(os.path.join(config['paths']['download'], filename),
                                  os.path.join(config['paths']['build'], "python-{}".format(python_version))
                                  )
                          )
                .depend(urldownload.URLDownload("{0}/{1}/{2}"
                                                .format(python_url,
                                                        python_version,
                                                        filename
                                                        )
                                                )
                        )
                )
else:

    def install(context):
        path_segments = [context['build_path'], "PCbuild"]
        if config['architecture'] == "x86_64":
            path_segments.append("amd64")
        path_segments.append("*.lib")
        for f in glob(os.path.join(*path_segments)):
            shutil.copy(
Пример #5
0
        os.path.join(get_visual_studio_2017('15.0'), "..", "..", "..",
                     "Common7", "IDE", "devenv.exe"), "PCBuild/pcbuild.sln",
        "/upgrade"
    ]


def install(context):
    make_sure_path_exists(os.path.join(path_install, "libs"))
    path_segments = [context['build_path'], "PCbuild"]
    if config['architecture'] == "x86_64":
        path_segments.append("amd64")
    path_segments.append("*.lib")
    shutil.copy(os.path.join(python['build_path'], "PC", "pyconfig.h"),
                os.path.join(python['build_path'], "Include", "pyconfig.h"))
    for f in glob(os.path.join(*path_segments)):
        shutil.copy(f, os.path.join(path_install, "libs"))
    return True


def download(context):
    return True


python = Project("Python") \
    .depend(build.Execute(install)
            .depend(msbuild.MSBuild("PCBuild/PCBuild.sln", "python,pyexpat",
                                    project_PlatformToolset=config['vc_platformtoolset'])
                    .depend(build.Run(upgrade_args, name="upgrade python project")
                            .depend(github.Source("LePresidente", "cpython-1", config.get('python_version', "2.7"), shallowclone=True) \
                                    .set_destination("python-{}".format(python_version + python_version_minor))))))
Пример #6
0
# if config.get('prefer_binary_dependencies', False):
if False:
    # the python installer registers in windows and prevent further installations. This means this installation
    # would interfere with the rest of the system
    filename = "python-{0}{1}.msi".format(
        python_version,
        ".amd64" if config['architecture'] == "x86_64" else ""
    )

    python = Project("Python") \
        .depend(build.Run("msiexec /i {0} TARGETDIR={1} /qn ADDLOCAL=DefaultFeature,SharedCRT"
                          .format(os.path.join(config['paths']['download'], filename),
                                  os.path.join(config['paths']['build'], "python-{}".format(python_version))
                                  )
                          )
                .depend(urldownload.URLDownload("{0}/{1}/{2}"
                                                .format(python_url,
                                                        python_version,
                                                        filename
                                                        )
                                                )
                        )
                )
else:
    def install(context):
        make_sure_path_exists(os.path.join(config["paths"]["install"], "libs"))
        path_segments = [context['build_path'], "PCbuild"]
        if config['architecture'] == "x86_64":
            path_segments.append("amd64")
        path_segments.append("*.lib")
        shutil.copy(os.path.join(python['build_path'], "PC", "pyconfig.h"),
                    os.path.join(python['build_path'], "Include", "pyconfig.h"))