Skip to content

Commit

Permalink
Merge pull request #5 from cvc5/fix-venv
Browse files Browse the repository at this point in the history
Fix Python venv
  • Loading branch information
daniel-larraz authored Jan 25, 2024
2 parents 9a6e20a + 440e044 commit 0f42185
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@ jobs:
if: always() && github.event_name == 'pull_request'
uses: actions/upload-artifact@main
with:
name: bottles
name: bottle-${{ matrix.os }}
path: '*.bottle.*'
12 changes: 5 additions & 7 deletions Formula/cvc5.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,15 @@ class Cvc5 < Formula

desc "Efficient open-source automatic theorem prover for SMT problems"
homepage "https://cvc5.github.io/"
url "https://github.com/cvc5/cvc5.git", tag: "cvc5-1.0.8"
url "https://github.com/cvc5/cvc5.git", tag: "cvc5-1.1.1"
head "https://github.com/cvc5/cvc5.git", branch: "main"

option "with-java-bindings", "Build Java bindings based on new C++ API"
option "with-python-bindings", "Build python bindings based on new C++ API"

depends_on "cmake"
depends_on "cmake" => :build
depends_on "python@3" => :build
depends_on "gmp"
depends_on :java if build.with? "java-bindings"
depends_on "[email protected]"

resource "tomli" do
url "https://files.pythonhosted.org/packages/c0/3f/d7af728f075fb08564c5949a9c95e44352e23dee646869fa104a3b2060a3/tomli-2.0.1.tar.gz"
Expand All @@ -25,18 +24,17 @@ class Cvc5 < Formula
end

def install
venv = virtualenv_create(libexec)
venv = virtualenv_create(buildpath/"venv", "python3")
venv.pip_install resources

command_line = [
"./configure.sh",
"--auto-download",
"--static",
"--prefix=#{prefix}",
"-DCMAKE_FIND_FRAMEWORK=NEVER",
"-DPython_EXECUTABLE=#{buildpath}/venv/bin/python",
]

command_line << "--python-bindings" if build.with? "python-bindings"
command_line << "--java-bindings" if build.with? "java-bindings"

command = Shellwords.join(command_line)
Expand Down

0 comments on commit 0f42185

Please sign in to comment.