aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2013-09-02 22:32:02 +0100
committerMike McQuaid2013-09-02 22:32:02 +0100
commitec36776d60d3c4c92e8958df42e44d6c6e689e60 (patch)
treef47c4efaff7cce162b3fd75ab3d927d306a01034 /Library
parenta19f31ad275ab46a37e19ea780fefbef55ef9841 (diff)
downloadhomebrew-ec36776d60d3c4c92e8958df42e44d6c6e689e60.tar.bz2
Fix various Python import tests.
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/enchant.rb6
-rw-r--r--Library/Formula/fontforge.rb6
-rw-r--r--Library/Formula/libvirt.rb10
-rw-r--r--Library/Formula/shiboken.rb6
4 files changed, 23 insertions, 5 deletions
diff --git a/Library/Formula/enchant.rb b/Library/Formula/enchant.rb
index daeed7c41..56353ad19 100644
--- a/Library/Formula/enchant.rb
+++ b/Library/Formula/enchant.rb
@@ -37,8 +37,10 @@ class Enchant < Formula
end
def test
- python do
- system python, "-c", "import enchant; d=enchant.Dict('en_US'); print(d.suggest('homebrew'))"
+ if build.with? 'python'
+ python do
+ system python, "-c", "import enchant; d=enchant.Dict('en_US'); print(d.suggest('homebrew'))"
+ end
end
end
end
diff --git a/Library/Formula/fontforge.rb b/Library/Formula/fontforge.rb
index 3c2ad8a11..bb8d9b7fe 100644
--- a/Library/Formula/fontforge.rb
+++ b/Library/Formula/fontforge.rb
@@ -87,7 +87,11 @@ class Fontforge < Formula
def test
system "#{bin}/fontforge", "-version"
- system python, "-c", "import fontforge"
+ if build.with? 'python'
+ python do
+ system python, "-c", "import fontforge"
+ end
+ end
end
def caveats
diff --git a/Library/Formula/libvirt.rb b/Library/Formula/libvirt.rb
index 1c4ba97b4..6b88d28a2 100644
--- a/Library/Formula/libvirt.rb
+++ b/Library/Formula/libvirt.rb
@@ -61,4 +61,14 @@ class Libvirt < Formula
end
end
end
+
+ test do
+ if build.with? 'python'
+ python do
+ # Testing to import the mod because that is a .so file where linking
+ # can break.
+ system python, '-c', "import libvirtmod"
+ end
+ end
+ end
end
diff --git a/Library/Formula/shiboken.rb b/Library/Formula/shiboken.rb
index 171a666a2..fe01e19b9 100644
--- a/Library/Formula/shiboken.rb
+++ b/Library/Formula/shiboken.rb
@@ -49,8 +49,10 @@ class Shiboken < Formula
end
test do
- python do
- system python, "-c", "import shiboken"
+ if build.with? 'python'
+ python do
+ system python, "-c", "import shiboken"
+ end
end
end
end