subliminal: use system Python 2

as we will remove the python@2 formula end of the year.

Closes #48025.

Signed-off-by: Michka Popoff <michkapopoff@gmail.com>
This commit is contained in:
Michka Popoff 2019-12-18 19:20:23 +01:00
parent eaf1e71c8e
commit 578d23a540

View file

@ -5,6 +5,7 @@ class Subliminal < Formula
homepage "https://subliminal.readthedocs.org"
url "https://files.pythonhosted.org/packages/f0/84/8cddb13aa4142e85546cd7c0d0546d2c1a25f0876000a3ec37151dfd8eb9/subliminal-2.0.5.tar.gz"
sha256 "147aa54f54de62d6fcafa213bb9ea89319600c133dab1a5532ff7126352bfbb7"
revision 1
head "https://github.com/Diaoul/subliminal.git"
bottle do
@ -16,7 +17,7 @@ class Subliminal < Formula
sha256 "1e53262d5fe047cbb56366be5c195f172a28c1d0f24dfaccb1808c7d4bd739ac" => :sierra
end
depends_on "python@2" # does not support Python 3.7
uses_from_macos "python@2" # does not support Python 3.7
resource "appdirs" do
url "https://files.pythonhosted.org/packages/bd/66/0a7f48a0f3fb1d3a4072bceb5bbd78b1a6de4d801fb7135578e7c7b1f563/appdirs-1.4.0.tar.gz"
@ -109,7 +110,19 @@ class Subliminal < Formula
end
def install
virtualenv_install_with_resources
ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python2.7/site-packages"
resources.each do |r|
r.stage do
system "python", *Language::Python.setup_install_args(libexec/"vendor")
end
end
site_packages = libexec/"lib/python2.7/site-packages"
ENV.prepend_create_path "PYTHONPATH", site_packages
system "python", *Language::Python.setup_install_args(libexec)
bin.install Dir[libexec/"bin/*"]
bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"])
end
test do