本文整理汇总了Python中pysmt.cmd.installers.base.SolverInstaller.clean_dir方法的典型用法代码示例。如果您正苦于以下问题:Python SolverInstaller.clean_dir方法的具体用法?Python SolverInstaller.clean_dir怎么用?Python SolverInstaller.clean_dir使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pysmt.cmd.installers.base.SolverInstaller
的用法示例。
在下文中一共展示了SolverInstaller.clean_dir方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: compile
# 需要导入模块: from pysmt.cmd.installers.base import SolverInstaller [as 别名]
# 或者: from pysmt.cmd.installers.base.SolverInstaller import clean_dir [as 别名]
def compile(self):
# Prepare an empty folder for installing yices
SolverInstaller.clean_dir(self.yices_path)
SolverInstaller.run("bash ./install-yices %s" % self.yices_path,
directory=self.extract_path)
self.install_yicespy()
示例2: compile
# 需要导入模块: from pysmt.cmd.installers.base import SolverInstaller [as 别名]
# 或者: from pysmt.cmd.installers.base.SolverInstaller import clean_dir [as 别名]
def compile(self):
# Prepare an empty folder for installing yices
SolverInstaller.clean_dir(self.yices_path)
if self.needs_compilation:
SolverInstaller.run("bash configure --prefix %s" % self.yices_path,
directory=self.extract_path)
SolverInstaller.run("make", directory=self.extract_path)
SolverInstaller.run("make install", directory=self.extract_path)
else:
SolverInstaller.run("bash ./install-yices %s" % self.yices_path,
directory=self.extract_path)
self.install_yicespy()
示例3: install_pyices
# 需要导入模块: from pysmt.cmd.installers.base import SolverInstaller [as 别名]
# 或者: from pysmt.cmd.installers.base.SolverInstaller import clean_dir [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})
示例4: install_yicespy
# 需要导入模块: from pysmt.cmd.installers.base import SolverInstaller [as 别名]
# 或者: from pysmt.cmd.installers.base.SolverInstaller import clean_dir [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)