From 2edcc21bb2b4f76f26838ab47c859b731f0a21e2 Mon Sep 17 00:00:00 2001 From: ilovezfs Date: Mon, 14 May 2018 16:18:48 -0700 Subject: [PATCH] gdal: fix python support Closes #27844. Signed-off-by: ilovezfs --- Formula/gdal.rb | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/Formula/gdal.rb b/Formula/gdal.rb index 799145faf0..f67f664e9f 100644 --- a/Formula/gdal.rb +++ b/Formula/gdal.rb @@ -137,10 +137,9 @@ class Gdal < Formula system "make", "install" if build.stable? # GDAL 2.3 handles Python differently - Language::Python.each_python(build) do |python, _version| - cd "swig/python" do - system python, *Language::Python.setup_install_args(prefix) - end + cd "swig/python" do + system "python3", *Language::Python.setup_install_args(prefix) + system "python2", *Language::Python.setup_install_args(prefix) end bin.install Dir["swig/python/scripts/*.py"] end @@ -157,9 +156,8 @@ class Gdal < Formula system "#{bin}/gdalinfo", "--formats" system "#{bin}/ogrinfo", "--formats" if build.stable? # GDAL 2.3 handles Python differently - Language::Python.each_python(build) do |python, _version| - system python, "-c", "import gdal" - end + system "python3", "-c", "import gdal" + system "python2", "-c", "import gdal" end end end