mesa: move to Python 3

Closes #43785.

Signed-off-by: FX Coudert <fxcoudert@gmail.com>
This commit is contained in:
FX Coudert 2019-09-02 20:37:14 +02:00
parent b6ef943b64
commit 832fc743ed

View file

@ -15,7 +15,7 @@ class Mesa < Formula
depends_on "meson-internal" => :build
depends_on "ninja" => :build
depends_on "pkg-config" => :build
depends_on "python@2" => :build
depends_on "python" => :build
depends_on "freeglut" => :test
depends_on "expat"
depends_on "gettext"
@ -32,10 +32,11 @@ class Mesa < Formula
end
def install
ENV.prepend_create_path "PYTHONPATH", buildpath/"vendor/lib/python2.7/site-packages"
xy = Language::Python.major_minor_version "python3"
ENV.prepend_create_path "PYTHONPATH", buildpath/"vendor/lib/python#{xy}/site-packages"
resource("Mako").stage do
system "python", *Language::Python.setup_install_args(buildpath/"vendor")
system "python3", *Language::Python.setup_install_args(buildpath/"vendor")
end
resource("gears.c").stage(pkgshare.to_s)