aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-08-21 01:29:50 -0500
committerJack Nagel2014-08-21 01:30:02 -0500
commit50c1ca83f4da7ed66bb5473014855cba539838a1 (patch)
tree41260db1a2f316ce0f36545b6bea99c74365ac9d /Library
parent2d50fd59993fd0b51807f9957db0e7e30ad718b0 (diff)
downloadhomebrew-50c1ca83f4da7ed66bb5473014855cba539838a1.tar.bz2
libplist: use Cython resource
Closes #31294.
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/libplist.rb18
1 files changed, 16 insertions, 2 deletions
diff --git a/Library/Formula/libplist.rb b/Library/Formula/libplist.rb
index e9021b900..eec09fe76 100644
--- a/Library/Formula/libplist.rb
+++ b/Library/Formula/libplist.rb
@@ -19,7 +19,11 @@ class Libplist < Formula
depends_on "pkg-config" => :build
depends_on "libxml2"
depends_on :python => :optional
- depends_on "Cython" => :python if build.with? "python"
+
+ resource "cython" do
+ url "http://cython.org/release/Cython-0.20.2.tar.gz"
+ sha1 "e3fd4c32bdfa4a388cce9538417237172c656d55"
+ end
def install
ENV.deparallelize
@@ -28,7 +32,17 @@ class Libplist < Formula
--disable-silent-rules
--prefix=#{prefix}
]
- args << "--without-cython" if build.without? "python"
+
+ if build.with? "python"
+ resource("cython").stage do
+ ENV.prepend_create_path "PYTHONPATH", buildpath+"lib/python2.7/site-packages"
+ system "python", "setup.py", "build", "install", "--prefix=#{buildpath}"
+ end
+ ENV.prepend_path "PATH", "#{buildpath}/bin"
+ else
+ args << "--without-cython"
+ end
+
system "./configure", *args
system "make install"
end