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


Python SolverInstaller.untar方法代码示例

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


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

示例1: compile

# 需要导入模块: from pysmt.cmd.installers.base import SolverInstaller [as 别名]
# 或者: from pysmt.cmd.installers.base.SolverInstaller import untar [as 别名]
    def compile(self):
        import glob
        # Build lingeling
        lingeling_archive = glob.glob(os.path.join(self.extract_path,
                                                   "archives", "lingeling-*.tar.gz"))[0]
        SolverInstaller.untar(lingeling_archive, self.extract_path)
        lingeling_dir = glob.glob(os.path.join(self.extract_path,
                                               "lingeling*"))[0]
        SolverInstaller.mv(lingeling_dir,
                           os.path.join(self.extract_path, "lingeling"))
        SolverInstaller.run("bash ./configure.sh -fPIC",
                          directory=os.path.join(self.extract_path, "lingeling"))
        SolverInstaller.run("make",
                          directory=os.path.join(self.extract_path, "lingeling"))

        # Build Btor
        boolector_archive = glob.glob(os.path.join(self.extract_path,
                                                   "archives", "boolector-*.tar.gz"))[0]
        SolverInstaller.untar(boolector_archive, self.extract_path)
        boolector_dir = glob.glob(os.path.join(self.extract_path,
                                               "boolector*"))[0]
        SolverInstaller.mv(boolector_dir,
                           os.path.join(self.extract_path, "boolector"))

        SolverInstaller.run("bash ./configure.sh -python",
                          directory=os.path.join(self.extract_path, "boolector"))
        SolverInstaller.run("make",
                          directory=os.path.join(self.extract_path, "boolector"))

        # Redo this step to make sure the correct version of python is used
        SolverInstaller.run_python("setup.py build_ext -b build -t build/api/python/tmp",
                                   directory=os.path.join(self.extract_path, "boolector"))
开发者ID:mpreiner,项目名称:pysmt,代码行数:34,代码来源:btor.py

示例2: compile

# 需要导入模块: from pysmt.cmd.installers.base import SolverInstaller [as 别名]
# 或者: from pysmt.cmd.installers.base.SolverInstaller import untar [as 别名]
    def compile(self):
        # Unpack
        SolverInstaller.untar(os.path.join(self.base_dir, self.archive_name),
                              self.extract_path)

        # Build lingeling
        SolverInstaller.run("bash ./contrib/setup-lingeling.sh",
                            directory=self.extract_path)

        # Build Btor
        SolverInstaller.run("bash ./contrib/setup-btor2tools.sh",
                            directory=self.extract_path)

        # Inject Python library and include paths into CMake because Boolector
        # search system can be fooled in some systems
        import distutils.sysconfig as sysconfig
        PYTHON_LIBRARY = sysconfig.get_config_var('LIBDIR')
        PYTHON_INCLUDE_DIR = sysconfig.get_python_inc()
        CMAKE_OPTS = ' -DPYTHON_LIBRARY=' + PYTHON_LIBRARY
        CMAKE_OPTS += ' -DPYTHON_INCLUDE_DIR=' + PYTHON_INCLUDE_DIR

        # Build Boolector Solver
        SolverInstaller.run("bash ./configure.sh --python",
                            directory=self.extract_path,
                            env_variables={"CMAKE_OPTS": CMAKE_OPTS})

        SolverInstaller.run("make -j2",
                            directory=os.path.join(self.extract_path, "build"))
开发者ID:pysmt,项目名称:pysmt,代码行数:30,代码来源:btor.py

示例3: install_pyices

# 需要导入模块: from pysmt.cmd.installers.base import SolverInstaller [as 别名]
# 或者: from pysmt.cmd.installers.base.SolverInstaller import untar [as 别名]
    def install_pyices(self):
        pyices_git = "aa0b91c39aa00c19c2160e83aad822dc468ce328"
        pyices_base_name =  "pyices-%s" % pyices_git
        pyices_archive_name = "%s.tar.gz" % pyices_base_name
        pyices_archive = os.path.join(self.base_dir, pyices_archive_name)
        pyices_dir_path = os.path.join(self.base_dir, pyices_base_name)

        pyices_download_link = \
            "https://codeload.github.com/cheshire/pyices/tar.gz/%s" % pyices_git
        SolverInstaller.do_download(pyices_download_link, pyices_archive)

        SolverInstaller.clean_dir(pyices_dir_path)

        SolverInstaller.untar(pyices_archive, self.base_dir)
        # Build pyices
        SolverInstaller.run_python("setup.py install --prefix=%s" % self.install_dir,
                                   directory=pyices_dir_path,
                                   env_variables={"YICES_PATH" : self.yices_path})
开发者ID:diasalvatore,项目名称:pysmt,代码行数:20,代码来源:yices.py

示例4: install_yicespy

# 需要导入模块: from pysmt.cmd.installers.base import SolverInstaller [as 别名]
# 或者: from pysmt.cmd.installers.base.SolverInstaller import untar [as 别名]
    def install_yicespy(self):
        yicespy_git_version = self.yicespy_git_version
        yicespy_base_name =  "yicespy"
        yicespy_archive_name = "%s.tar.gz" % yicespy_base_name
        yicespy_archive = os.path.join(self.base_dir, yicespy_archive_name)
        yicespy_dir_path = os.path.join(self.base_dir,
                                        yicespy_base_name + "-" + yicespy_git_version)

        yicespy_download_link = "https://codeload.github.com/pysmt/yicespy/tar.gz/%s" % (yicespy_git_version)
        SolverInstaller.do_download(yicespy_download_link, yicespy_archive)

        SolverInstaller.clean_dir(yicespy_dir_path)

        SolverInstaller.untar(yicespy_archive, self.base_dir)
        # Build yicespy
        SolverInstaller.run_python("setup.py --yices-dir=%s -- build_ext bdist_wheel --dist-dir=%s " % (self.yices_path, self.base_dir),
                                   directory=yicespy_dir_path)
        wheel_file = glob.glob(os.path.join(self.base_dir, "yicespy") + "*.whl")[0]
        SolverInstaller.unzip(wheel_file, self.bindings_dir)
开发者ID:pysmt,项目名称:pysmt,代码行数:21,代码来源:yices.py


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