diff options
| author | Mike McQuaid | 2014-01-04 13:09:29 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2014-01-04 13:35:43 +0000 |
| commit | 18cd018cc5a2ea8b30f291e34628ffd8ce211f68 (patch) | |
| tree | 1031169a0eb8946318f733098408a4aa54befb5f /Library/Formula/libxml2.rb | |
| parent | eb748785918a33030fb579f51beb8ec8ea47a4be (diff) | |
| download | homebrew-18cd018cc5a2ea8b30f291e34628ffd8ce211f68.tar.bz2 | |
libxml2: cleanup python usage.
Diffstat (limited to 'Library/Formula/libxml2.rb')
| -rw-r--r-- | Library/Formula/libxml2.rb | 38 |
1 files changed, 5 insertions, 33 deletions
diff --git a/Library/Formula/libxml2.rb b/Library/Formula/libxml2.rb index 79133b5cb..54919091f 100644 --- a/Library/Formula/libxml2.rb +++ b/Library/Formula/libxml2.rb @@ -10,9 +10,9 @@ class Libxml2 < Formula # 2.9.1 cannot build with Python 2.6: https://github.com/Homebrew/homebrew/issues/20249 if MacOS.version <= :snow_leopard - depends_on :python => ["2.7", :optional] + depends_on 'python' => :optional else - depends_on :python => ["2.7", :recommended] + depends_on :python => :recommended end end @@ -48,38 +48,10 @@ class Libxml2 < Formula ENV.deparallelize system "make install" - python do - # This python do block sets up the site-packages in the Cellar. - cd 'python' do - # We need to insert our include dir first - inreplace 'setup.py', 'includes_dir = [', "includes_dir = ['#{include}', '#{MacOS.sdk_path}/usr/include'," - system python, 'setup.py', "install", "--prefix=#{prefix}" - end - # This is keg_only but it makes sense to have the python bindings: - ohai 'Linking python bindings' - Dir["#{python.site_packages}/*"].each{ |f| - path = python.global_site_packages/(Pathname.new(f).basename) - puts path - rm path if path.exist? - ln_s f, path - } - end if build.with? 'python' - end - - def caveats if build.with? 'python' - <<-EOS.undent - Even if this formula is keg_only, the python bindings have been linked - into Homebrew's global site-packages for your convenience. - #{python.global_site_packages} - - EOS - end - end - - test do - python do - system python, '-c', "import libxml2" + # We need to insert our include dir first + inreplace 'setup.py', 'includes_dir = [', "includes_dir = ['#{include}', '#{MacOS.sdk_path}/usr/include'," + system "python", 'setup.py', "install", "--prefix=#{prefix}" end end end |
