pygobject3: remove python@2
This commit is contained in:
parent
15dc4a04aa
commit
529126e320
1 changed files with 5 additions and 19 deletions
|
@ -3,6 +3,7 @@ class Pygobject3 < Formula
|
|||
homepage "https://wiki.gnome.org/Projects/PyGObject"
|
||||
url "https://download.gnome.org/sources/pygobject/3.32/pygobject-3.32.2.tar.xz"
|
||||
sha256 "c39ca2a28364b57fa00549c6e836346031e6b886c3ceabfd8ab4b4fed0a83611"
|
||||
revision 1
|
||||
|
||||
bottle do
|
||||
cellar :any
|
||||
|
@ -18,18 +19,8 @@ class Pygobject3 < Formula
|
|||
depends_on "py2cairo"
|
||||
depends_on "py3cairo"
|
||||
depends_on "python"
|
||||
depends_on "python@2"
|
||||
|
||||
def install
|
||||
mkdir "buildpy2" do
|
||||
system "meson", "--prefix=#{prefix}",
|
||||
"-Dpycairo=true",
|
||||
"-Dpython=python2.7",
|
||||
".."
|
||||
system "ninja", "-v"
|
||||
system "ninja", "install", "-v"
|
||||
end
|
||||
|
||||
mkdir "buildpy3" do
|
||||
system "meson", "--prefix=#{prefix}",
|
||||
"-Dpycairo=true",
|
||||
|
@ -48,14 +39,9 @@ class Pygobject3 < Formula
|
|||
from gi.repository import GLib
|
||||
assert(31 == GLib.Date.get_days_in_month(GLib.DateMonth.JANUARY, 2000))
|
||||
EOS
|
||||
pythons = [
|
||||
Formula["python@2"].opt_bin/"python2",
|
||||
Formula["python"].opt_bin/"python3",
|
||||
]
|
||||
pythons.each do |python|
|
||||
pyversion = Language::Python.major_minor_version(python)
|
||||
ENV.prepend_path "PYTHONPATH", lib/"python#{pyversion}/site-packages"
|
||||
system python, "test.py"
|
||||
end
|
||||
|
||||
pyversion = Language::Python.major_minor_version "python3"
|
||||
ENV.prepend_path "PYTHONPATH", lib/"python#{pyversion}/site-packages"
|
||||
system "python3", "test.py"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue