Skip to content
This repository has been archived by the owner on Jan 16, 2025. It is now read-only.

Commit

Permalink
libmagic: Now --with-python
Browse files Browse the repository at this point in the history
And a test.
Use `brew test libmagic --with-python`
  • Loading branch information
samueljohn committed Jun 13, 2013
1 parent 8da47cd commit 6e97ac1
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Library/Formula/libmagic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ class Libmagic < Formula

option :universal

depends_on :python => :optional

# Fixed upstream, should be in next release
# See http://bugs.gw.com/view.php?id=230
def patches; DATA; end if MacOS.version < :lion
Expand All @@ -20,10 +22,22 @@ def install
"--enable-fsect-man5"
system "make install"

python do
cd "python" do
system python, "setup.py", "install", "--prefix=#{prefix}"
end
end

# Don't dupe this system utility
rm bin/"file"
rm man1/"file.1"
end

test do
if build.with? 'python'
system 'python', '-c', "import magic; magic._init()"
end
end
end

__END__
Expand Down

0 comments on commit 6e97ac1

Please # to comment.