pygobject3 3.32.0

Closes #37760.

Signed-off-by: FX Coudert <fxcoudert@gmail.com>
This commit is contained in:
Tom Schoonjans 2019-03-10 14:24:02 +00:00 committed by FX Coudert
parent 08d912d519
commit 48d20ee3dc

View file

@ -1,8 +1,8 @@
class Pygobject3 < Formula class Pygobject3 < Formula
desc "GNOME Python bindings (based on GObject Introspection)" desc "GNOME Python bindings (based on GObject Introspection)"
homepage "https://wiki.gnome.org/Projects/PyGObject" homepage "https://wiki.gnome.org/Projects/PyGObject"
url "https://download.gnome.org/sources/pygobject/3.30/pygobject-3.30.4.tar.xz" url "https://download.gnome.org/sources/pygobject/3.32/pygobject-3.32.0.tar.xz"
sha256 "2dc1a1a444b82955e65b81c2a2511ecf8032404beba4ef1d48144168f2f64c43" sha256 "83f4d7e59fde6bc6b0d39c5e5208574802f759bc525a4cb8e7265dfcba45ef29"
bottle do bottle do
cellar :any cellar :any
@ -44,9 +44,17 @@ class Pygobject3 < Formula
test do test do
Pathname("test.py").write <<~EOS Pathname("test.py").write <<~EOS
import gi import gi
gi.require_version("GLib", "2.0")
assert("__init__" in gi.__file__) assert("__init__" in gi.__file__)
from gi.repository import GLib
assert(31 == GLib.Date.get_days_in_month(GLib.DateMonth.JANUARY, 2000))
EOS EOS
Language::Python.each_python(build) do |python, pyversion| 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" ENV.prepend_path "PYTHONPATH", lib/"python#{pyversion}/site-packages"
system python, "test.py" system python, "test.py"
end end