diff --git a/Formula/python.rb b/Formula/python.rb index ecc93dd6cc..ae039ac60b 100644 --- a/Formula/python.rb +++ b/Formula/python.rb @@ -206,7 +206,7 @@ class Python < Formula def post_install ENV.delete "PYTHONPATH" - xy = (prefix/"Frameworks/Python.framework/Versions").children.sort.first.basename.to_s + xy = (prefix/"Frameworks/Python.framework/Versions").children.min.basename.to_s site_packages = HOMEBREW_PREFIX/"lib/python#{xy}/site-packages" site_packages_cellar = prefix/"Frameworks/Python.framework/Versions/#{xy}/lib/python#{xy}/site-packages" @@ -283,7 +283,7 @@ class Python < Formula end def sitecustomize - xy = (prefix/"Frameworks/Python.framework/Versions").children.sort.first.basename.to_s + xy = (prefix/"Frameworks/Python.framework/Versions").children.min.basename.to_s <<~EOS # This file is created by Homebrew and is executed on each python startup. @@ -324,7 +324,7 @@ class Python < Formula def caveats if prefix.exist? - xy = (prefix/"Frameworks/Python.framework/Versions").children.sort.first.basename.to_s + xy = (prefix/"Frameworks/Python.framework/Versions").children.min.basename.to_s else xy = version.to_s.slice(/(3\.\d)/) || "3.6" end @@ -362,7 +362,7 @@ class Python < Formula end test do - xy = (prefix/"Frameworks/Python.framework/Versions").children.sort.first.basename.to_s + xy = (prefix/"Frameworks/Python.framework/Versions").children.min.basename.to_s # Check if sqlite is ok, because we build with --enable-loadable-sqlite-extensions # and it can occur that building sqlite silently fails if OSX's sqlite is used. system "#{bin}/python#{xy}", "-c", "import sqlite3"