flake8: move to Python 3

Closes #33127.

Signed-off-by: FX Coudert <fxcoudert@gmail.com>
This commit is contained in:
Chongyu Zhu 2018-10-18 20:35:55 +08:00 committed by FX Coudert
parent 433448e3e9
commit 325ada0cf1

View file

@ -5,6 +5,7 @@ class Flake8 < Formula
homepage "http://flake8.pycqa.org/"
url "https://gitlab.com/pycqa/flake8/repository/archive.tar.gz?ref=3.5.0"
sha256 "97ecdc088b9cda5acfaa6f84d9d830711669ad8d106d5c68d5897ece3c5cdfda"
revision 1
head "https://gitlab.com/PyCQA/flake8.git", :shallow => false
bottle do
@ -15,10 +16,10 @@ class Flake8 < Formula
sha256 "cfbc382496c31b5c57e31ac2487d022a07673d9efd2d64cbc956d3e05c8d9afe" => :el_capitan
end
depends_on "python@2"
depends_on "python"
def install
venv = virtualenv_create(libexec)
venv = virtualenv_create(libexec, "python3")
system libexec/"bin/pip", "install", "-v", "--no-binary", ":all:",
"--ignore-installed", buildpath
system libexec/"bin/pip", "uninstall", "-y", name
@ -26,6 +27,7 @@ class Flake8 < Formula
end
test do
system "#{bin}/flake8", "#{libexec}/lib/python2.7/site-packages/flake8"
xy = Language::Python.major_minor_version "python3"
system "#{bin}/flake8", "#{libexec}/lib/python#{xy}/site-packages/flake8"
end
end