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


Python SolverInstaller.mv方法代码示例

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


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

示例1: compile

# 需要导入模块: from pysmt.cmd.installers.base import SolverInstaller [as 别名]
# 或者: from pysmt.cmd.installers.base.SolverInstaller import mv [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 mv [as 别名]
    def compile(self):
        if self.os_name == "windows":
            libdir = os.path.join(self.python_bindings_dir, "../lib")
            incdir = os.path.join(self.python_bindings_dir, "../include")
            gmp_h_url = "https://github.com/mikand/tamer-windows-deps/raw/master/gmp/include/gmp.h"
            mpir_dll_url = "https://github.com/Legrandin/mpir-windows-builds/blob/master/mpir-2.6.0_VS2015_%s/mpir.dll?raw=true" % self.bits
            mpir_lib_url = "https://github.com/Legrandin/mpir-windows-builds/blob/master/mpir-2.6.0_VS2015_%s/mpir.lib?raw=true" % self.bits
            setup_py_win_url = "https://github.com/pysmt/solvers_patches/raw/master/mathsat/setup-win.py"

            SolverInstaller.do_download(gmp_h_url, os.path.join(incdir, "gmp.h"))
            SolverInstaller.do_download(mpir_dll_url, os.path.join(libdir, "mpir.dll"))
            SolverInstaller.do_download(mpir_lib_url, os.path.join(libdir, "mpir.lib"))

            # Overwrite setup.py with the patched version
            setup_py = os.path.join(self.python_bindings_dir, "setup.py")
            SolverInstaller.mv(setup_py, setup_py + ".original")
            SolverInstaller.do_download(setup_py_win_url, setup_py)

        # Run setup.py to compile the bindings
        if self.os_name == "windows":
            SolverInstaller.run_python("./setup.py build_ext", self.python_bindings_dir)
        else:
            # NB: -R adds --rpath=$ORIGIN to link step, which makes shared library object
            # searched for in the extension's directory (no need for LD_LIBRARY_PATH)
            # (note: this is the default behavior for DLL discovery on Windows)
            SolverInstaller.run_python("./setup.py build_ext -R $ORIGIN", self.python_bindings_dir)
开发者ID:mpreiner,项目名称:pysmt,代码行数:28,代码来源:msat.py

示例3: move

# 需要导入模块: from pysmt.cmd.installers.base import SolverInstaller [as 别名]
# 或者: from pysmt.cmd.installers.base.SolverInstaller import mv [as 别名]
    def move(self):
        libdir = "lib.%s-%s-%s" % (self.os_name, self.architecture,
                                   self.python_version)
        bdir = os.path.join(self.extract_path, "build")
        sodir = os.path.join(bdir, libdir)

        for f in os.listdir(sodir):
            if f.endswith(".so"):
                SolverInstaller.mv(os.path.join(sodir, f), self.bindings_dir)
        SolverInstaller.mv(os.path.join(self.extract_path, "picosat.py"), self.bindings_dir)
开发者ID:fontealpina,项目名称:pysmt,代码行数:12,代码来源:pico.py

示例4: move

# 需要导入模块: from pysmt.cmd.installers.base import SolverInstaller [as 别名]
# 或者: from pysmt.cmd.installers.base.SolverInstaller import mv [as 别名]
    def move(self):
        libdir = "lib.%s-%s-%s" % (self.os_name, self.architecture,
                                   self.python_version)
        if self.os_name == "darwin":
            osx_version = ".".join(platform.mac_ver()[0].split(".")[:2])
            libdir = libdir.replace("darwin", "macosx-%s" % osx_version)
        pdir = self.python_bindings_dir
        bdir = os.path.join(pdir, "build")
        sodir = os.path.join(bdir, libdir)

        for f in os.listdir(sodir):
            if f.endswith(".so"):
                SolverInstaller.mv(os.path.join(sodir, f), self.bindings_dir)
        SolverInstaller.mv(os.path.join(pdir, "mathsat.py"), self.bindings_dir)
开发者ID:agriggio,项目名称:pysmt,代码行数:16,代码来源:msat.py

示例5: move

# 需要导入模块: from pysmt.cmd.installers.base import SolverInstaller [as 别名]
# 或者: from pysmt.cmd.installers.base.SolverInstaller import mv [as 别名]
 def move(self):
     bpath = os.path.join(self.extract_path, "bin")
     files = [
         "libz3.so",
         "z3consts.py",
         "z3core.py",
         "z3num.py",
         "z3poly.py",
         "z3printer.py",
         "z3.py",
         "z3rcf.py",
         "z3test.py",
         "z3types.py",
         "z3util.py",
     ]
     for f in files:
         SolverInstaller.mv(os.path.join(bpath, f), self.bindings_dir)
开发者ID:diasalvatore,项目名称:pysmt,代码行数:19,代码来源:z3.py

示例6: move

# 需要导入模块: from pysmt.cmd.installers.base import SolverInstaller [as 别名]
# 或者: from pysmt.cmd.installers.base.SolverInstaller import mv [as 别名]
    def move(self):
        bpath = os.path.join(self.extract_path, "bin")
        files = ["z3consts.py",
                 "z3core.py",
                 "z3num.py",
                 "z3poly.py",
                 "z3printer.py",
                 "z3.py",
                 "z3rcf.py",
                 "z3test.py",
                 "z3types.py",
                 "z3util.py"]
        if self.os_name == "linux":
            files += [ "libz3.so" ]
        elif self.os_name == "darwin":
            files += [ "libz3.a", "libz3.dylib" ]
        elif self.os_name == "windows":
            files += [ "libz3.dll", "libz3.lib" ]

        for f in files:
            SolverInstaller.mv(os.path.join(bpath, f), self.bindings_dir)
开发者ID:agriggio,项目名称:pysmt,代码行数:23,代码来源:z3.py

示例7: move

# 需要导入模块: from pysmt.cmd.installers.base import SolverInstaller [as 别名]
# 或者: from pysmt.cmd.installers.base.SolverInstaller import mv [as 别名]
    def move(self):
        pdir = self.python_bindings_dir
        bdir = os.path.join(pdir, "build")
        sodir = glob.glob(bdir + "/lib.*")[0]
        libdir = os.path.join(self.python_bindings_dir, "../lib")

        # First, we need the SWIG-generated wrapper
        for f in os.listdir(sodir):
            if f.endswith(".so") or f.endswith(".pyd"):
                SolverInstaller.mv(os.path.join(sodir, f), self.bindings_dir)
        SolverInstaller.mv(os.path.join(pdir, "mathsat.py"), self.bindings_dir)

        # Since MathSAT 5.5.0 we also need the SO/DLL/DYLIB of mathsat in the PATH
        # Under Windows, we also need the DLLs of MPIR in the PATH
        for f in os.listdir(libdir):
            if f.endswith(".so") or f.endswith(".dll") or f.endswith(".dylib"):
                SolverInstaller.mv(os.path.join(libdir, f), self.bindings_dir)

        # Fix issue in MathSAT 5.5.1 linking to incorrect directory on OSX
        if self.os_name == "darwin":
            soname = glob.glob(self.bindings_dir + "/_mathsat*.so")[0]
            old_path = "/Users/griggio/Documents/src/mathsat_release/build/libmathsat.dylib"
            new_path = "%s/libmathsat.dylib" % self.bindings_dir
            SolverInstaller.run("install_name_tool -change %s %s %s" %
                                (old_path, new_path, soname))
开发者ID:mpreiner,项目名称:pysmt,代码行数:27,代码来源:msat.py

示例8: move

# 需要导入模块: from pysmt.cmd.installers.base import SolverInstaller [as 别名]
# 或者: from pysmt.cmd.installers.base.SolverInstaller import mv [as 别名]
    def move(self):
        bpath = os.path.join(self.extract_path, "bin")
        libfiles = []
        if self.os_name == "linux":
            libfiles += glob.glob(bpath + '/*.so')
        elif self.os_name == "darwin":
            libfiles += glob.glob(bpath + '/*.a')
            libfiles += glob.glob(bpath + '/*.dylib')
        elif self.os_name == "windows":
            libfiles += glob.glob(bpath + '/*.dll')
            libfiles += glob.glob(bpath + '/*.lib')

        SolverInstaller.mv(os.path.join(bpath, "python/z3"), self.bindings_dir)

        # z3 will check for shared libraries in z3/lib, before builtins.Z3_LIB_DIRS,
        # and Z3_LIBRARY_PATH env var lookup (or OS-level LD_LIBRARY_PATH)
        # (see z3/z3core.py)
        libpath = os.path.join(self.bindings_dir, "z3/lib/")
        if not os.path.exists(libpath):
            os.mkdir(libpath)

        for f in libfiles:
            SolverInstaller.mv(f, libpath)
开发者ID:pysmt,项目名称:pysmt,代码行数:25,代码来源:z3.py

示例9: move

# 需要导入模块: from pysmt.cmd.installers.base import SolverInstaller [as 别名]
# 或者: from pysmt.cmd.installers.base.SolverInstaller import mv [as 别名]
 def move(self):
     bdir = os.path.join(self.extract_path, "boolector/build")
     for f in os.listdir(bdir):
         if f.startswith("boolector") and f.endswith(".so"):
             SolverInstaller.mv(os.path.join(bdir, f), self.bindings_dir)
开发者ID:mpreiner,项目名称:pysmt,代码行数:7,代码来源:btor.py

示例10: move

# 需要导入模块: from pysmt.cmd.installers.base import SolverInstaller [as 别名]
# 或者: from pysmt.cmd.installers.base.SolverInstaller import mv [as 别名]
 def move(self):
     SolverInstaller.mv(os.path.join(self.extract_path, "repycudd.py"),
                        self.bindings_dir)
     SolverInstaller.mv(os.path.join(self.extract_path, "_repycudd.so"),
                        self.bindings_dir)
开发者ID:diasalvatore,项目名称:pysmt,代码行数:7,代码来源:bdd.py

示例11: move

# 需要导入模块: from pysmt.cmd.installers.base import SolverInstaller [as 别名]
# 或者: from pysmt.cmd.installers.base.SolverInstaller import mv [as 别名]
 def move(self):
     SolverInstaller.mv(os.path.join(self.bin_path, "share/pyshared/CVC4.py"),
                        self.bindings_dir)
     SolverInstaller.mv(os.path.join(self.bin_path, "lib/pyshared/_CVC4.so"),
                                     self.bindings_dir)
开发者ID:diasalvatore,项目名称:pysmt,代码行数:7,代码来源:cvc4.py

示例12: move

# 需要导入模块: from pysmt.cmd.installers.base import SolverInstaller [as 别名]
# 或者: from pysmt.cmd.installers.base.SolverInstaller import mv [as 别名]
 def move(self):
     sub = "lib/python%s/site-packages/pyices" % self.python_version
     SolverInstaller.mv(os.path.join(self.install_dir, sub),
                        self.bindings_dir)
开发者ID:diasalvatore,项目名称:pysmt,代码行数:6,代码来源:yices.py

示例13: move

# 需要导入模块: from pysmt.cmd.installers.base import SolverInstaller [as 别名]
# 或者: from pysmt.cmd.installers.base.SolverInstaller import mv [as 别名]
 def move(self):
     CVC4_py = os.path.join(self.bin_path, "CVC4.py")
     CVC4_so = os.path.join(self.bin_path, "_CVC4.so")
     SolverInstaller.mv(CVC4_py, self.bindings_dir)
     SolverInstaller.mv(CVC4_so, self.bindings_dir)
开发者ID:pysmt,项目名称:pysmt,代码行数:7,代码来源:cvc4.py


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