forked from codedreality/homebrew-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
python-dbus.rb
39 lines (33 loc) · 1.16 KB
/
python-dbus.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
class PythonDbus < Formula
desc "Python bindings for libdbus"
homepage "http://dbus.freedesktop.org/doc/dbus-python/"
url "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-1.2.0.tar.gz"
sha256 "e12c6c8b2bf3a9302f75166952cbe41d6b38c3441bbc6767dbd498942316c6df"
depends_on "pkg-config" => :build
depends_on "d-bus"
depends_on "dbus-glib"
depends_on :python => :recommended
depends_on :python3 => :optional
if build.without?("python") && build.without?("python3")
odie "You must build with python and/or python3 support."
end
def install
# make check fails
# https://bugs.freedesktop.org/show_bug.cgi?id=57140
inreplace "test/test-standalone.py", "def test_utf8(self):", "def skip_utf8(self):"
Language::Python.each_python(build) do |python, _|
ENV["PYTHON"] = python
system "./configure", "--disable-dependency-tracking",
"--prefix=#{prefix}"
system "make", "clean"
system "make"
system "make", "check"
system "make", "install"
end
end
test do
Language::Python.each_python(build) do |python, _|
system python, "-c", "import dbus"
end
end
end