aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/python.rb4
-rw-r--r--Library/Formula/python3.rb4
-rw-r--r--Library/Homebrew/cmd/audit.rb4
-rw-r--r--Library/Homebrew/dependency_collector.rb6
-rw-r--r--Library/Homebrew/python_helper.rb6
-rw-r--r--Library/Homebrew/requirements/python_dependency.rb4
6 files changed, 14 insertions, 14 deletions
diff --git a/Library/Formula/python.rb b/Library/Formula/python.rb
index e842ffae8..f462faf37 100644
--- a/Library/Formula/python.rb
+++ b/Library/Formula/python.rb
@@ -125,9 +125,9 @@ class Python < Formula
# Symlink the prefix site-packages into the cellar.
ln_s site_packages, site_packages_cellar
- # We ship setuptools and pip and reuse the PythonInstalled
+ # We ship setuptools and pip and reuse the PythonDependency
# Requirement here to write the sitecustomize.py
- py = PythonInstalled.new("2.7")
+ py = PythonDependency.new("2.7")
py.binary = bin/'python'
py.modify_build_environment
diff --git a/Library/Formula/python3.rb b/Library/Formula/python3.rb
index 506068d2e..54c20b3cc 100644
--- a/Library/Formula/python3.rb
+++ b/Library/Formula/python3.rb
@@ -138,9 +138,9 @@ class Python3 < Formula
# Make sure homebrew symlinks it to HOMEBREW_PREFIX/bin.
ln_s "#{bin}/python#{VER}", "#{bin}/python3" unless (bin/"python3").exist?
- # We ship setuptools and pip and reuse the PythonInstalled
+ # We ship setuptools and pip and reuse the PythonDependency
# Requirement here to write the sitecustomize.py
- py = PythonInstalled.new(VER)
+ py = PythonDependency.new(VER)
py.binary = bin/"python#{VER}"
py.modify_build_environment
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb
index af111a564..b970ccf8a 100644
--- a/Library/Homebrew/cmd/audit.rb
+++ b/Library/Homebrew/cmd/audit.rb
@@ -568,8 +568,8 @@ class FormulaAuditor
end
end
- unless f.requirements.any?{ |r| r.kind_of?(PythonInstalled) }
- # So if there is no PythonInstalled requirement, we can check if the
+ unless f.requirements.any?{ |r| r.kind_of?(PythonDependency) }
+ # So if there is no PythonDependency requirement, we can check if the
# formula still uses python and should add a `depends_on :python`
unless f.name.to_s =~ /(pypy[0-9]*)|(python[0-9]*)/
if text =~ /system.["' ]?python([0-9"'])?/
diff --git a/Library/Homebrew/dependency_collector.rb b/Library/Homebrew/dependency_collector.rb
index 8d0aac452..773987544 100644
--- a/Library/Homebrew/dependency_collector.rb
+++ b/Library/Homebrew/dependency_collector.rb
@@ -74,7 +74,7 @@ class DependencyCollector
elsif (tag = tags.first) && LANGUAGE_MODULES.include?(tag)
# Next line only for legacy support of `depends_on 'module' => :python`
# It should be replaced by `depends_on :python => 'module'`
- return PythonInstalled.new("2", spec) if tag == :python
+ return PythonDependency.new("2", spec) if tag == :python
LanguageModuleDependency.new(tag, spec)
else
Dependency.new(spec, tags)
@@ -103,8 +103,8 @@ class DependencyCollector
when :clt then CLTDependency.new(tags)
when :arch then ArchRequirement.new(tags)
when :hg then MercurialDependency.new(tags)
- when :python, :python2 then PythonInstalled.new("2", tags)
- when :python3 then PythonInstalled.new("3", tags)
+ when :python, :python2 then PythonDependency.new("2", tags)
+ when :python3 then PythonDependency.new("3", tags)
# Tiger's ld is too old to properly link some software
when :ld64 then LD64Dependency.new if MacOS.version < :leopard
else
diff --git a/Library/Homebrew/python_helper.rb b/Library/Homebrew/python_helper.rb
index bace441fc..d91bd7d2f 100644
--- a/Library/Homebrew/python_helper.rb
+++ b/Library/Homebrew/python_helper.rb
@@ -3,7 +3,7 @@
# This method has a dual nature. For one, it takes a &block and sets up
# the ENV such that a Python, as defined in the requirements, is the default.
-# If there are multiple `PythonInstalled` requirements, the block is evaluated
+# If there are multiple `PythonDependency` requirements, the block is evaluated
# once for each Python. This makes it possible to easily support 2.x and
# 3.x Python bindings without code duplication in formulae.
# If you need to special case stuff, set :allowed_major_versions.
@@ -24,8 +24,8 @@ def python_helper(options={:allowed_major_versions => [2, 3]}, &block)
end
end
- # Look for PythonInstalled requirements for this formula:
- python_reqs = requirements.select{ |r| r.kind_of?(PythonInstalled) }
+ # Look for PythonDependency requirements for this formula:
+ python_reqs = requirements.select{ |r| r.kind_of?(PythonDependency) }
if python_reqs.empty?
raise "If you use python in the formula, you have to add `depends_on :python` (or :python3)!"
end
diff --git a/Library/Homebrew/requirements/python_dependency.rb b/Library/Homebrew/requirements/python_dependency.rb
index 1ba7aebee..f07d3b212 100644
--- a/Library/Homebrew/requirements/python_dependency.rb
+++ b/Library/Homebrew/requirements/python_dependency.rb
@@ -6,14 +6,14 @@ require 'requirement'
# In `dependency_collector.rb`, special `:python` and `:python3` shortcuts are
# defined. You can specify a minimum version of the Python that needs to be
# present, but since not every package is ported to 3.x yet,
-# `PythonInstalled("2")` is not satisfied by 3.x.
+# `PythonDependency("2")` is not satisfied by 3.x.
# In a formula that shall provide support for 2.x and 3.x, the idiom is:
# depends_on :python
# depends_on :python3 => :optional # or :recommended
#
# Todo:
# - Allow further options that choose: universal, framework?, brewed?...
-class PythonInstalled < Requirement
+class PythonDependency < Requirement
attr_reader :min_version
attr_reader :if3then3
attr_reader :imports