def compile(self): # Select the correct Makefile to be used makefile = "Makefile" if self.architecture == "x86_64": makefile = "Makefile_64bit" # Find python-config command = self.find_python_config() if command is None: raise OSError("No installation of python-config found on this system." " Please install python-config for this version of python.") print("Found python-config in %s" % command) # Build the pycudd prefix = None p = subprocess.Popen([command, '--includes'], stdout=subprocess.PIPE, stderr=None) prefix = p.stdout.read() if PY2: pass # Prefix is already a string else: # > PY3 Prefix is binary data prefix = prefix.decode() if not prefix or len(prefix) == 0: prefix = "/usr" SolverInstaller.run("make -C %s -f %s PYTHON_INCL=%s" % (self.extract_path, makefile, prefix))
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()
def compile(self): picosat_dir = os.path.join(self.extract_path, "picosat-%s" % self.solver_version) SolverInstaller.run('bash configure.sh', directory=picosat_dir, env_variables={"CFLAGS": " -fPIC"}) SolverInstaller.run('make', directory=picosat_dir, env_variables={"CFLAGS": " -fPIC"}) SolverInstaller.run_python("setup.py build", directory=self.extract_path)
def compile(self): # Prepare the building system SolverInstaller.run("bash autogen.sh", directory=self.extract_path) # Build ANTLR SolverInstaller.run("bash get-antlr-3.4", directory=os.path.join(self.extract_path, "contrib")) # Configure and build CVC4 config_cmd = "./configure --prefix={bin_path} \ --enable-language-bindings=python \ --with-antlr-dir={dir_path}/antlr-3.4 ANTLR={dir_path}/antlr-3.4/bin/antlr3" config_cmd = config_cmd.format(bin_path=self.bin_path, dir_path=self.extract_path) if os.path.exists(sys.executable + "-config"): pyconfig = {"PYTHON_CONFIG": sys.executable + "-config"} else: pyconfig = {} SolverInstaller.run(config_cmd, directory=self.extract_path, env_variables=pyconfig) SolverInstaller.run("make", directory=self.extract_path, env_variables=pyconfig) SolverInstaller.run("make install", directory=self.extract_path, env_variables=pyconfig) # Fix the paths of the bindings SolverInstaller.mv( os.path.join(self.bin_path, "lib/pyshared/CVC4.so.4.0.0"), os.path.join(self.bin_path, "lib/pyshared/_CVC4.so"))
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"))