aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/portmidi.rb14
1 files changed, 4 insertions, 10 deletions
diff --git a/Library/Formula/portmidi.rb b/Library/Formula/portmidi.rb
index ccecfd766..d89e79882 100644
--- a/Library/Formula/portmidi.rb
+++ b/Library/Formula/portmidi.rb
@@ -8,7 +8,8 @@ class Portmidi < Formula
option 'with-java', 'Build java based app and bindings. You need the Java SDK for this.'
depends_on 'cmake' => :build
- depends_on :python => [:optional, 'Cython']
+ depends_on :python => :optional
+ depends_on 'Cython' => :python if build.with? 'python'
def patches
# Avoid that the Makefile.osx builds the java app and fails because: fatal error: 'jni.h' file not found
@@ -29,7 +30,7 @@ class Portmidi < Formula
system 'make -f pm_mac/Makefile.osx'
system 'make -f pm_mac/Makefile.osx install'
- python do
+ if build.with? 'python'
cd 'pm_python' do
# There is no longer a CHANGES.txt or TODO.txt.
inreplace 'setup.py', "CHANGES = open('CHANGES.txt').read()", 'CHANGES = ""'
@@ -37,17 +38,10 @@ class Portmidi < Formula
# Provide correct dirs (that point into the Cellar)
ENV.append 'CFLAGS', "-I#{include}"
ENV.append 'LDFLAGS', "-L#{lib}"
- system python, "setup.py", "install", "--prefix=#{prefix}"
+ system "python", "setup.py", "install", "--prefix=#{prefix}"
end
end
end
-
- test do
- python do
- system python, "-c", "import pyportmidi; pyportmidi.init()"
- end
- end
-
end
__END__