From 864eccedbeb7f5125359a911a99f4d7aa50450b4 Mon Sep 17 00:00:00 2001 From: ilovezfs Date: Wed, 1 Mar 2017 22:45:24 -0800 Subject: [PATCH] mypy 0.500 Closes #10508. Signed-off-by: ilovezfs --- Formula/mypy.rb | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/Formula/mypy.rb b/Formula/mypy.rb index 99a5885baf..b79c8f0857 100644 --- a/Formula/mypy.rb +++ b/Formula/mypy.rb @@ -2,8 +2,8 @@ class Mypy < Formula desc "Experimental optional static type checker for Python" homepage "http://www.mypy-lang.org/" url "https://github.com/python/mypy.git", - :tag => "v0.471", - :revision => "f16a63957d897a889d9c1dfd93abdb1ad51a2ab2" + :tag => "v0.500", + :revision => "9aee8abbf2b918f7e3ced3507fde1ef8166b99ea" head "https://github.com/python/mypy.git" bottle do @@ -25,6 +25,11 @@ class Mypy < Formula sha256 "273846f8aacac32bf9542365a593b495b68d8035c2e382c9ccedcac387c9a0a1" end + resource "typed-ast" do + url "https://files.pythonhosted.org/packages/1e/5e/ca6cef7a04c6c5df26b827e6cdca71af047fcf4d439b28a0f7bbf3b9a720/typed-ast-1.0.1.zip" + sha256 "b5f578a05498922300b8150716f9689ec4c3e7071f99f6568eed73e68bfa5983" + end + def install xy = Language::Python.major_minor_version "python3" @@ -45,6 +50,13 @@ class Mypy < Formula rm version_static end + ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python#{xy}/site-packages" + resources.each do |r| + r.stage do + system "python3", *Language::Python.setup_install_args(libexec/"vendor") + end + end + ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python#{xy}/site-packages" system "python3", *Language::Python.setup_install_args(libexec)