unicorn: add option install python bindings

The unicorn emulator provides bindings to several languages. With this
commit, the python bindings are installed by default.

Closes #32984.

Signed-off-by: FX Coudert <fxcoudert@gmail.com>
This commit is contained in:
Jonatan Lindén 2018-10-14 16:38:09 +02:00 committed by FX Coudert
parent 04bf1b5ba5
commit fa38ab3948

View file

@ -23,6 +23,10 @@ class Unicorn < Formula
ENV["UNICORN_DEBUG"] = "no"
system "make"
system "make", "install"
cd "bindings/python" do
system "python", *Language::Python.setup_install_args(prefix)
end
end
test do
@ -72,5 +76,7 @@ class Unicorn < Formula
system ENV.cc, "-o", testpath/"test1", testpath/"test1.c",
"-lpthread", "-lm", "-L#{lib}", "-lunicorn"
system testpath/"test1"
system "python", "-c", "import unicorn; print(unicorn.__version__)"
end
end