portmidi: cleanup python usage.
This commit is contained in:
parent
ba1cfe2df3
commit
5a11004e55
1 changed files with 4 additions and 10 deletions
|
@ -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__
|
||||
|
|
Loading…
Reference in a new issue