Skip to content

Commit

Permalink
Fixed broken boolector installer
Browse files Browse the repository at this point in the history
  • Loading branch information
mikand committed Aug 2, 2017
1 parent cae13f8 commit c4a06b4
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions pysmt/cmd/installers/btor.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,30 @@ def __init__(self, install_dir, bindings_dir, solver_version,
mirror_link=mirror_link)

def compile(self):
# First build
SolverInstaller.run("make", directory=self.extract_path)
# Extract sub-archives
SolverInstaller.run("tar xf archives/lingeling*.tar.gz", directory=self.extract_path)
SolverInstaller.run("mv lingeling* lingeling", directory=self.extract_path)
SolverInstaller.run("tar xf archives/boolector*.tar.gz", directory=self.extract_path)
SolverInstaller.run("mv boolector* boolector", directory=self.extract_path)

# Reconfigure and build python bindings
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"))

SolverInstaller.run("bash ./configure -python",
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"))


def move(self):
bdir = os.path.join(self.extract_path, "boolector")
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)
Expand Down

0 comments on commit c4a06b4

Please sign in to comment.