diff options
| author | Samuel John | 2013-07-16 11:04:57 +0200 | 
|---|---|---|
| committer | Samuel John | 2013-07-16 11:04:57 +0200 | 
| commit | 606749c0debfdf2f18f6bbbc681e17092e3781f7 (patch) | |
| tree | 6c29984b4ee0b2f7d8c1384855c2bc8051bae37a /Library/Homebrew/dependency_collector.rb | |
| parent | 9b1b92e7feaa67249d2c81bc6e3609ab2b62ae54 (diff) | |
| download | homebrew-606749c0debfdf2f18f6bbbc681e17092e3781f7.tar.bz2 | |
Allow specifying version in depends_on :python
Note, in the explict form:
    PythonInstalled.new('2.7') => :recommended
the tag :recommended is ignored (not a limitation
of PythonInstalled itself). One solution was to write
    PythonInstalled.new('2.7', [:recommended])
but that is not as beautiful as we like it.
Therefore, now it is possible to:
    depends_on :python => ['2.7', :recommended]
Only the first tag is attempted to be parsed as
a version specifyer "x" or "x.y" or "x.y.z"...
Diffstat (limited to 'Library/Homebrew/dependency_collector.rb')
| -rw-r--r-- | Library/Homebrew/dependency_collector.rb | 6 | 
1 files changed, 3 insertions, 3 deletions
diff --git a/Library/Homebrew/dependency_collector.rb b/Library/Homebrew/dependency_collector.rb index e11be462d..378e12cbb 100644 --- a/Library/Homebrew/dependency_collector.rb +++ b/Library/Homebrew/dependency_collector.rb @@ -70,7 +70,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, *tags) if tag == :python +      return PythonInstalled.new("2", spec) if tag == :python        LanguageModuleDependency.new(tag, spec)      else        Dependency.new(spec, tags) @@ -99,8 +99,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 PythonInstalled.new("2", tags) +    when :python3    then PythonInstalled.new("3", tags)      # Tiger's ld is too old to properly link some software      when :ld64       then LD64Dependency.new if MacOS.version < :leopard      else  | 
