From 70253f0009ee8095a5d10ee7bdd891f1fe5cc35c Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sat, 3 Mar 2018 09:42:25 +0000 Subject: Adjust docs and more internal code for Python 3. Now we have `python` for Python 3 and `python@2` for Python 2 some more adjustments need to be made. --- Library/Homebrew/compat/dependency_collector.rb | 6 +++--- Library/Homebrew/compat/requirements.rb | 8 ++++---- .../Homebrew/compat/requirements/language_module_requirement.rb | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) (limited to 'Library/Homebrew/compat') diff --git a/Library/Homebrew/compat/dependency_collector.rb b/Library/Homebrew/compat/dependency_collector.rb index 88d393488..8bea8a5aa 100644 --- a/Library/Homebrew/compat/dependency_collector.rb +++ b/Library/Homebrew/compat/dependency_collector.rb @@ -52,11 +52,11 @@ class DependencyCollector output_deprecation(spec, "open-mpi") Dependency.new("open-mpi", tags) when :python, :python2 + output_deprecation(spec, "python@2") + Dependency.new("python@2", tags) + when :python3 output_deprecation(spec, "python") Dependency.new("python", tags) - when :python3 - output_deprecation(spec, "python3") - Dependency.new("python3", tags) when :emacs, :mysql, :perl, :postgresql, :rbenv, :ruby output_deprecation(spec) Dependency.new(spec.to_s, tags) diff --git a/Library/Homebrew/compat/requirements.rb b/Library/Homebrew/compat/requirements.rb index 38344c1fc..3dd5c7479 100644 --- a/Library/Homebrew/compat/requirements.rb +++ b/Library/Homebrew/compat/requirements.rb @@ -84,16 +84,16 @@ end class PythonRequirement < Requirement fatal true satisfy do - odeprecated("PythonRequirement", "'depends_on \"python\"'") - which "python" + odeprecated("PythonRequirement", "'depends_on \"python@2\"'") + which "python2" end end class Python3Requirement < Requirement fatal true satisfy do - odeprecated("Python3Requirement", "'depends_on \"python3\"'") - which "python3" + odeprecated("Python3Requirement", "'depends_on \"python\"'") + which "python" end end diff --git a/Library/Homebrew/compat/requirements/language_module_requirement.rb b/Library/Homebrew/compat/requirements/language_module_requirement.rb index 5ddce7a66..fc9dcc442 100644 --- a/Library/Homebrew/compat/requirements/language_module_requirement.rb +++ b/Library/Homebrew/compat/requirements/language_module_requirement.rb @@ -38,9 +38,9 @@ class LanguageModuleRequirement < Requirement when :perl ["/usr/bin/env", "perl", "-e", "use #{@import_name}"] when :python - ["/usr/bin/env", "python", "-c", "import #{@import_name}"] + ["/usr/bin/env", "python2", "-c", "import #{@import_name}"] when :python3 - ["/usr/bin/env", "python3", "-c", "import #{@import_name}"] + ["/usr/bin/env", "python", "-c", "import #{@import_name}"] when :ruby ["/usr/bin/env", "ruby", "-rubygems", "-e", "require '#{@import_name}'"] end @@ -51,8 +51,8 @@ class LanguageModuleRequirement < Requirement when :lua then "luarocks-5.2 install" when :lua51 then "luarocks-5.1 install" when :perl then "cpan -i" - when :python then "pip install" - when :python3 then "pip3 install" + when :python then "pip3 install" + when :python3 then "pip install" when :ruby then "gem install" end end -- cgit v1.2.3