当前位置: 首页>>代码示例>>Python>>正文


Python Driver.drive_install方法代码示例

本文整理汇总了Python中driver.Driver.drive_install方法的典型用法代码示例。如果您正苦于以下问题:Python Driver.drive_install方法的具体用法?Python Driver.drive_install怎么用?Python Driver.drive_install使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在driver.Driver的用法示例。


在下文中一共展示了Driver.drive_install方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: drive_install

# 需要导入模块: from driver import Driver [as 别名]
# 或者: from driver.Driver import drive_install [as 别名]
    def drive_install(self):
        self.check_call(["sudo", "apt-get", "update"])
        self.check_call(["sudo", "apt-get", "install", "gfortran"])
        self.check_call([
            "wget", "--no-check-certificate", "--progress=dot",
            "https://cmake.org/files/v3.5/cmake-3.5.0-Linux-x86_64.tar.gz"
        ])
        self.check_call(["tar", "xzf", "cmake-3.5.0-Linux-x86_64.tar.gz"])
        self.check_call([
            "sudo", "rsync", "-avz", "cmake-3.5.0-Linux-x86_64/", "/usr/local"
        ])

        Driver.drive_install(self)
开发者ID:opadron,项目名称:scikit-build,代码行数:15,代码来源:circle_driver.py

示例2: drive_install

# 需要导入模块: from driver import Driver [as 别名]
# 或者: from driver.Driver import drive_install [as 别名]
    def drive_install(self):
        cmake_version = "3.5"
        cmake_os = "Linux"
        if self.is_darwin:
            cmake_os = "Darwin"

        cmake_name = "cmake-{}.0-{}-x86_64".format(cmake_version, cmake_os)
        cmake_package = ".".join((cmake_name, "tar", "gz"))

        self.log("Downloading", cmake_package)
        self.check_call([
            "wget", "--no-check-certificate", "--progress=dot",
            "https://cmake.org/files/v{}/{}".format(
                cmake_version, cmake_package)
        ])

        self.log("Extracting", cmake_package)
        self.check_call(["tar", "xzf", cmake_package])

        if self.is_darwin:
            prefix = "/usr/local/bin"
            self.log("Removing any existing CMake in", prefix)
            self.check_call(
                ["sudo", "rm", "-f"] + [
                    "/".join((prefix, subdir)) for subdir in
                    ("cmake", "cpack", "cmake-gui", "ccmake", "ctest")
                ]
            )

            self.log("Installing CMake in", prefix)
            self.check_call([
                "sudo",
                cmake_name + "/CMake.app/Contents/bin/cmake-gui",
                "--install"
            ])

            self.check_call(
                "\n".join((
                    "brew update",
                    "brew outdated pyenv || brew upgrade pyenv",
                    "eval \"$( pyenv init - )\"",
                    "pyenv install " + self.py_version,
                    "pyenv local " + self.py_version,
                    "echo 'Python Version:'",
                    (
                        "python -c \""
                        "import sys, struct ; "
                        "print(sys.version) ; "
                        "print('{}-bit'.format(struct.calcsize('P') * 8))"
                        "\""
                    ),
                    (
                        "pip install "
                        "--user --disable-pip-version-check --user --upgrade "
                        "pip"
                    ),
                    "pip install --user -r requirements.txt",
                    "pip install --user -r requirements-dev.txt",
                )),
                shell=True
            )

        else:
            self.log("Copying", cmake_name, "to /usr/local")
            self.check_call([
                "sudo", "rsync", "-avz", cmake_name + "/", "/usr/local"])

            Driver.drive_install(self)
开发者ID:opadron,项目名称:scikit-build,代码行数:70,代码来源:travis_driver.py


注:本文中的driver.Driver.drive_install方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。