aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/compat
diff options
context:
space:
mode:
authorMike McQuaid2018-03-03 18:17:04 +0000
committerGitHub2018-03-03 18:17:04 +0000
commitbc3389bdae5be31e5447802cb0eb8e1a967f5b4d (patch)
tree2d61e66163e0fbf4650f38bb104374a32f53914c /Library/Homebrew/compat
parent5e3003688f801a49a46c1b24cb5e27d5c276af30 (diff)
parent70253f0009ee8095a5d10ee7bdd891f1fe5cc35c (diff)
downloadbrew-bc3389bdae5be31e5447802cb0eb8e1a967f5b4d.tar.bz2
Merge pull request #3863 from MikeMcQuaid/python3-changesHEADmaster
Adjust docs and more internal code for Python 3.
Diffstat (limited to 'Library/Homebrew/compat')
-rw-r--r--Library/Homebrew/compat/dependency_collector.rb6
-rw-r--r--Library/Homebrew/compat/requirements.rb8
-rw-r--r--Library/Homebrew/compat/requirements/language_module_requirement.rb8
3 files changed, 11 insertions, 11 deletions
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