summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2017-07-12 08:46:37 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2017-07-12 08:46:40 +0900
commitd71148e4448b78edde9dd063d65c00a13ed27cef (patch)
treeeeadb214137573fd724c40b8698eabe38f34c18a
parentdca4e6423c560689ee831785473ad3ab48e7548a (diff)
downloadpygobject2-d71148e4448b78edde9dd063d65c00a13ed27cef.tar.gz
pygobject2-d71148e4448b78edde9dd063d65c00a13ed27cef.tar.bz2
pygobject2-d71148e4448b78edde9dd063d65c00a13ed27cef.zip
Imported Upstream version 3.3.2
Change-Id: I655e3eb809d4970acd866fd9eebd35be45b6f79c Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
-rw-r--r--ChangeLog615
-rw-r--r--Makefile.am2
-rw-r--r--Makefile.in47
-rw-r--r--NEWS57
-rw-r--r--PKG-INFO4
-rw-r--r--aclocal.m410
-rwxr-xr-xcompile91
-rwxr-xr-xconfigure485
-rw-r--r--configure.ac7
-rwxr-xr-xdepcomp124
-rw-r--r--examples/Makefile.in26
-rw-r--r--gi/Makefile.in45
-rw-r--r--gi/_glib/Makefile.in37
-rw-r--r--gi/_gobject/Makefile.in39
-rw-r--r--gi/_gobject/__init__.py2
-rw-r--r--gi/_gobject/constants.py2
-rw-r--r--gi/_gobject/propertyhelper.py10
-rw-r--r--gi/_gobject/pygboxed.c3
-rw-r--r--gi/_gobject/pygobject.c218
-rw-r--r--gi/_gobject/pygtype.c47
-rw-r--r--gi/overrides/GLib.py3
-rw-r--r--gi/overrides/Gdk.py44
-rw-r--r--gi/overrides/Gtk.py25
-rw-r--r--gi/overrides/Makefile.in31
-rw-r--r--gi/pygi-argument.c25
-rw-r--r--gi/pygi-cache.c13
-rw-r--r--gi/pygi-closure.c17
-rw-r--r--gi/pygi-foreign-cairo.c85
-rw-r--r--gi/pygi-property.c39
-rw-r--r--gi/pygtkcompat.py45
-rw-r--r--gi/repository/Makefile.in31
-rw-r--r--gi/types.py6
-rw-r--r--tests/Makefile.am7
-rw-r--r--tests/Makefile.in33
-rw-r--r--tests/test_everything.py46
-rw-r--r--tests/test_gi.py184
-rw-r--r--tests/test_gobject.py149
-rw-r--r--tests/test_overrides.py38
-rw-r--r--tests/test_properties.py64
-rw-r--r--tests/test_pygtkcompat.py9
-rw-r--r--tests/test_signal.py2
41 files changed, 2372 insertions, 395 deletions
diff --git a/ChangeLog b/ChangeLog
index 4e634c7..4a0d5f6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,618 @@
+commit 7f0995e7fa865ebde7490d0570a7135a2f962cdf
+Author: Martin Pitt <martinpitt@gnome.org>
+Date: Tue Jun 5 19:09:12 2012 +0200
+
+ Release 3.3.2
+
+ NEWS | 44 ++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 44 insertions(+)
+
+commit 8209c1ae1632c77768699481e574d5d378956e71
+Author: Martin Pitt <martinpitt@gnome.org>
+Date: Tue Jun 5 19:04:49 2012 +0200
+
+ Fix "release-news" make target
+
+ Actually list changes since the previous release, not since 3.1.92.
+
+ Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit b21f66d2a399b8c9a36a1758107b7bdff0ec8eaa
+Author: Bastian Winkler <buz@netbuz.org>
+Date: Wed May 9 19:04:01 2012 +0200
+
+ foreign: Register cairo.Path and cairo.FontOptions foreign structs
+
+ They are rarely used, but they are used at least by Gdk, PangoCairo
+ and
+ Clutter.
+
+ clutter.Path is not used by any API that the test suite uses, so
+ leave that
+ without a test for now.
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=677388
+
+ Signed-off-by: Martin Pitt <martinpitt@gnome.org>
+
+ gi/pygi-foreign-cairo.c | 85
+ ++++++++++++++++++++++++++++++++++++++++++++++
+ tests/test_everything.py | 8 +++++
+ 2 files changed, 93 insertions(+)
+
+commit 635a7d1b48d99ddd1ea123797c493b18b0cdfd45
+Author: Marien Zwart <marien.zwart@gmail.com>
+Date: Wed May 23 01:51:46 2012 +0200
+
+ Check types in GBoxed assignments
+
+ Check if the Python value is GBoxed instead of assuming it is.
+ Without this, the following segfaults:
+
+ from gi.repository import Soup
+
+ msg = Soup.Message()
+ msg.props.uri = 'http://www.gnome.org'
+
+ as we assume the new property is a GBoxed while it is actually a
+ string.
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=676603
+
+ Co-authored-by: Martin Pitt <martinpitt@gnome.org>
+ Signed-off-by: Martin Pitt <martinpitt@gnome.org>
+
+ gi/pygi-argument.c | 10 +++++++---
+ tests/test_gi.py | 19 +++++++++++++++++++
+ 2 files changed, 26 insertions(+), 3 deletions(-)
+
+commit 2305dcd7e8841f87dc2fc683390df78453a5dc2a
+Author: Bastian Winkler <buz@netbuz.org>
+Date: Sat May 12 14:08:51 2012 +0200
+
+ [API add] Gtk overrides: Add TreeModelRow.get_previous()
+
+ TreeModelRow has get_next() and a next property, it should also have
+ get_previous() and previous.
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=677389
+
+ Signed-off-by: Martin Pitt <martinpitt@gnome.org>
+
+ gi/overrides/Gtk.py | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+commit 5501fba534696974899f2591929bff9e1b6ecd65
+Author: Bastian Winkler <buz@netbuz.org>
+Date: Sat May 12 13:50:02 2012 +0200
+
+ [API add] Add missing GObject.TYPE_VARIANT
+
+ Add TYPE_VARIANT to constants to make it accessible as
+ GObject.TYPE_VARIANT.
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=677387
+
+ Signed-off-by: Martin Pitt <martinpitt@gnome.org>
+
+ gi/_gobject/__init__.py | 1 +
+ gi/_gobject/constants.py | 1 +
+ 2 files changed, 2 insertions(+)
+
+commit 4c51a5411092f8ab6f8f6e9692a9b49692f621a7
+Author: Jasper St. Pierre <jstpierre@mecheye.net>
+Date: Fri Jun 1 02:53:13 2012 -0400
+
+ Fix boxed type equality
+
+ Each boxed type has its own Python type, not PyGBoxed_Type. Use
+ PyObject_IsInstance instead of comparing against PyGBoxed_Type
+ directly.
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=677249
+
+ Signed-off-by: Martin Pitt <martinpitt@gnome.org>
+
+ gi/_gobject/pygboxed.c | 3 ++-
+ tests/test_everything.py | 8 ++++++++
+ 2 files changed, 10 insertions(+), 1 deletion(-)
+
+commit dc8eef26906753fcb3ce057b23ca110137897fa5
+Author: Jose Rostagno <joserostagno@vijona.com.ar>
+Date: Fri Jun 1 13:43:38 2012 +0200
+
+ Fix TestProperties.testBoxed test
+
+ A typo was preventing the test from being run.
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=676644
+
+ Signed-off-by: Martin Pitt <martinpitt@gnome.org>
+
+ tests/test_properties.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit 853e6a71234ebd66af5a64dfb296e323c2c905a6
+Author: Carlos Garnacho <carlos@lanedo.com>
+Date: Thu May 17 17:09:15 2012 +0200
+
+ Fix handling of by-reference structs as out parameters
+
+ When marshalling back from python, copy the result of by-reference
+ structs into the memory expected by the native caller, instead of
+ attempting to handle it as a pointer.
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=653151
+
+ Signed-off-by: Martin Pitt <martinpitt@gnome.org>
+
+ gi/pygi-closure.c | 17 +++++++++++++++++
+ tests/test_gi.py | 5 +++++
+ 2 files changed, 22 insertions(+)
+
+commit bac9d526f6a9774821d1c9c0e7b35cc6db942975
+Author: Martin Pitt <martinpitt@gnome.org>
+Date: Fri Jun 1 12:28:53 2012 +0200
+
+ tests: Add more vfunc checks for GIMarshallingTestsObject
+
+ tests/test_gi.py | 25 +++++++++++++++++++++++++
+ 1 file changed, 25 insertions(+)
+
+commit e1aaf4a48453be0e69e7f3a70a2e7a790871a4d2
+Author: Martin Pitt <martinpitt@gnome.org>
+Date: Fri Jun 1 12:02:55 2012 +0200
+
+ Test caller-allocated GValue out parameter
+
+ This came up as a side issue in
+ https://bugzilla.gnome.org/show_bug.cgi?id=653151
+
+ tests/test_gi.py | 3 +++
+ 1 file changed, 3 insertions(+)
+
+commit edc17e703e1a05e20545d3df9167ceb076450443
+Author: Bastian Winkler <buz@netbuz.org>
+Date: Wed May 16 11:13:05 2012 +0200
+
+ GObject.bind_property: Support transform functions
+
+ Add support for optional transformation functions to
+ pygobject_bind_property(). It uses a custom PyGClosure to marshal the
+ return value correctly.
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=676169
+
+ Signed-off-by: Martin Pitt <martinpitt@gnome.org>
+
+ gi/_gobject/pygobject.c | 130
+ ++++++++++++++++++++++++++++++++++++++++++++---
+ tests/test_gobject.py | 59 +++++++++++++++++++++
+ 2 files changed, 181 insertions(+), 8 deletions(-)
+
+commit 07a08b49aae83a297e2f91240448314e4663f724
+Author: Carlos Garnacho <carlos@lanedo.com>
+Date: Mon May 14 15:31:14 2012 +0200
+
+ Fix lookup of vfuncs in parent classes
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=672864.
+
+ As subclasses implemented in python override the attribute for the
+ vfunc, __mro__ has to be used so subclasses of the subclass overriding
+ methods may find the corresponding VFuncInfo.
+
+ Co-Authored-by: Martin Pitt <martinpitt@gnome.org>
+
+ gi/types.py | 6 +++---
+ tests/test_gi.py | 27 +++++++++++++++++++++++++++
+ 2 files changed, 30 insertions(+), 3 deletions(-)
+
+commit b965ee15bac6cd28d16d32205d96d2b1bdd3f0e1
+Author: Martin Pitt <martinpitt@gnome.org>
+Date: Fri Jun 1 08:18:40 2012 +0200
+
+ tests/test_properties.py: Fix whitespace
+
+ The pep8 check failed on this.
+
+ tests/test_properties.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 274d60a7c08d74a299f4b83d8054c00eadb4bdbd
+Author: Jasper St. Pierre <jstpierre@mecheye.net>
+Date: Wed May 30 16:45:53 2012 -0400
+
+ gi: Support zero-terminated arrays with length arguments
+
+ Sometimes, you may see (array zero-terminated=1 length=length)
+ annotations.
+ Don't expose the length argument to the user in this case.
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=677124
+
+ gi/pygi-cache.c | 13 ++++---------
+ tests/test_gi.py | 3 +++
+ 2 files changed, 7 insertions(+), 9 deletions(-)
+
+commit 62c2e962a225ec2527aa3d7406aa0dae232a0886
+Author: Jasper St. Pierre <jstpierre@mecheye.net>
+Date: Fri May 25 17:09:55 2012 -0400
+
+ Fix build
+
+ libregress now needs cairo-gobject
+
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 9477f0f2f17a6d9b97e5ee08378bc009b8d4c30a
+Author: Martin Pitt <martinpitt@gnome.org>
+Date: Mon May 14 15:48:34 2012 +0200
+
+ Fix comment in previous commit
+
+ tests/test_gobject.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 6610428394d0c65987de5021bf2c38641cdb7116
+Author: Simon Feltman <s.feltman@gmail.com>
+Date: Tue May 8 20:04:09 2012 -0700
+
+ [API add] Add GObject.bind_property method
+
+ This adds the "bind_property" method for binding two gobject
+ properties
+ together. The method returns a weak reference to a GBinding object.
+ The BindingWeakRef object is used to manage GBinding objects within
+ python
+ created through GObject.bind_property. It is a sub-class
+ PyGObjectWeakRef so
+ that we can maintain the same reference counting semantics between
+ Python
+ and GObject Binding objects. This gives explicit direct control of the
+ binding lifetime by using the "unbind" method on the BindingWeakRef
+ object
+ along with implicit management based on the lifetime of the source or
+ target objects.
+
+ Note this does not yet include support for converter closures. This
+ can come
+ later after the initial implementation is accepted.
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=675582
+
+ Signed-off-by: Martin Pitt <martinpitt@gnome.org>
+
+ gi/_gobject/pygobject.c | 104
+ ++++++++++++++++++++++++++++++++++++++++++++++-
+ tests/test_gobject.py | 90 ++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 193 insertions(+), 1 deletion(-)
+
+commit 88babe7377402f6e6f912a8b83615aab848eae81
+Author: Jose Rostagno <joserostagno@vijona.com.ar>
+Date: Fri May 11 19:08:47 2012 -0300
+
+ pygtkcompat: Correctly set flags
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=675911
+
+ Signed-off-by: Martin Pitt <martinpitt@gnome.org>
+
+ gi/pygtkcompat.py | 5 ++---
+ tests/test_pygtkcompat.py | 1 +
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+commit 3f712b56397296bca2f5358cd52977b1a2011964
+Author: Jose Rostagno <joserostagno@vijona.com.ar>
+Date: Fri May 11 12:39:05 2012 -0300
+
+ Gtk overrides: Implement __delitem__ on TreeModel
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=675892
+
+ Signed-off-by: Martin Pitt <martinpitt@gnome.org>
+
+ gi/overrides/Gtk.py | 16 ++++++++++++----
+ tests/test_overrides.py | 9 +++++++++
+ 2 files changed, 21 insertions(+), 4 deletions(-)
+
+commit 9a1a07742ec0b1821d469603f9996a2b7d832f40
+Author: Simon Feltman <s.feltman@gmail.com>
+Date: Sun May 6 18:10:39 2012 -0700
+
+ Gdk Color override should support red/green/blue_float properties
+
+ Added red_float, green_float, and blue_float properties to Color.
+ Also added Color.from_floats, RGBA.to_color, and RGBA.from_color.
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=675579
+
+ Signed-off-by: Martin Pitt <martinpitt@gnome.org>
+
+ gi/overrides/Gdk.py | 44
+ ++++++++++++++++++++++++++++++++++++++++++++
+ tests/Makefile.am | 2 +-
+ tests/test_overrides.py | 17 +++++++++++++++++
+ 3 files changed, 62 insertions(+), 1 deletion(-)
+
+commit d9608c332d9592f03545b110cfac8105453ea035
+Author: Martin Pitt <martinpitt@gnome.org>
+Date: Sat May 5 12:42:42 2012 -0700
+
+ Support marshalling of GVariants for closures
+
+ Add GVariant handling to pyg_value_{as,from}_pyobject(), so that
+ closures can
+ be called with GVariant arguments and return GVariant.
+
+ Unmark the corresponding test case as "expected failure", and also
+ add cases
+ for None values and type mismatches.
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=656554
+
+ gi/_gobject/pygtype.c | 47
+ ++++++++++++++++++++++++++++++++++++++++++++--
+ tests/test_everything.py | 16 ++++++++++++----
+ 2 files changed, 57 insertions(+), 6 deletions(-)
+
+commit e7a909c16dc1c625ab11e270f23d540f15c71767
+Author: Johan Dahlin <johan@gnome.org>
+Date: Mon May 7 10:33:40 2012 -0300
+
+ Require gobject-introspection 1.33.0
+
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 9e8239684433631e0d1650d25416e4d7bf92a058
+Author: Martin Pitt <martinpitt@gnome.org>
+Date: Sun May 6 18:28:23 2012 -0700
+
+ NEWS: Add API additions since 3.2.0
+
+ NEWS | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+commit d1a2bf51eb25b54028fbf496d20dfad9546bcb5e
+Author: Martin Pitt <martinpitt@gnome.org>
+Date: Sun May 6 18:25:23 2012 -0700
+
+ NEWS: Mark API changes since 3.2.0
+
+ NEWS | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+commit a3329539291bd8ea9aa6cb184a05ea7c21f8885a
+Author: Martin Pitt <martinpitt@gnome.org>
+Date: Sun May 6 18:19:35 2012 -0700
+
+ Fix commit 168a087 for Python 3
+
+ Simplify the type check and use the already existing one. Fix the
+ string check
+ to work with both Python 2 and 3.
+
+ gi/pygi-argument.c | 42 +++++++++---------------------------------
+ 1 file changed, 9 insertions(+), 33 deletions(-)
+
+commit 42c717ed77613e02f3c8ef2685bc071462b87d73
+Author: Martin Pitt <martinpitt@gnome.org>
+Date: Sun May 6 18:08:57 2012 -0700
+
+ pygtkcompat.py: Typo fix
+
+ Was missing a space around operator, causing the PEP8 check to fail.
+
+ gi/pygtkcompat.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 168a08753cec1ff77ccca5d81b9a5fd2af5d3720
+Author: Martin Pitt <martinpitt@gnome.org>
+Date: Sun May 6 18:02:04 2012 -0700
+
+ _pygi_argument_from_object(): Check for compatible data type
+
+ Verify that the passed PyObject actually matches the expected type
+ of the
+ argument. With this, trying to assign a wrong type to a property
+ will now raise
+ a proper TypeError.
+
+ gi/pygi-argument.c | 39 +++++++++++++++++++++++++++++++++++++++
+ gi/pygi-property.c | 3 +++
+ tests/test_gi.py | 40 ++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 82 insertions(+)
+
+commit 5948b62ba3e08ea943e6965ee38c94c363186226
+Author: Martin Pitt <martinpitt@gnome.org>
+Date: Sun May 6 17:59:57 2012 -0700
+
+ pygtkcompat: Fix color conversion
+
+ gtk_style_context_get_background_color() returns a GdkRGBA value,
+ which has
+ float values between 0 and 1. However, we construct a GdkColor
+ object from
+ that, so we need to scale to 0..65535 and round to int.
+
+ gi/pygtkcompat.py | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+commit 6af74c501bc604559f8b5b4e0d856d022ed882bb
+Author: Martin Pitt <martinpitt@gnome.org>
+Date: Sun May 6 06:02:31 2012 -0700
+
+ test_gi: Check setting properties in constructor
+
+ tests/test_gi.py | 33 +++++++++++++++++++++++++++++++++
+ 1 file changed, 33 insertions(+)
+
+commit 9f50fd214e4214f83959b2883a0c667f7f157c97
+Author: Martin Pitt <martinpitt@gnome.org>
+Date: Sun May 6 05:50:00 2012 -0700
+
+ Support getting and setting GStrv properties
+
+ gi/pygi-property.c | 36 ++++++++++++++++++++++++++++++++++++
+ tests/test_gi.py | 11 +++++++++++
+ 2 files changed, 47 insertions(+)
+
+commit 8321af2c7df499291e664c676376f149a0c3dcac
+Author: Martin Pitt <martinpitt@gnome.org>
+Date: Sat May 5 13:58:29 2012 -0700
+
+ Support defining GStrv properties from Python
+
+ gi/_gobject/propertyhelper.py | 10 +++++--
+ tests/test_properties.py | 58
+ +++++++++++++++++++++++++++++++++++++++--
+ 2 files changed, 64 insertions(+), 4 deletions(-)
+
+commit f2494526e1c579c41babfe7ff67deef0f6966adf
+Author: Martin Pitt <martinpitt@gnome.org>
+Date: Sat May 5 13:21:20 2012 -0700
+
+ Add GObject.TYPE_STRV constant
+
+ gi/_gobject/__init__.py | 1 +
+ gi/_gobject/constants.py | 1 +
+ tests/test_everything.py | 2 +-
+ tests/test_signal.py | 2 +-
+ 4 files changed, 4 insertions(+), 2 deletions(-)
+
+commit 8c7306e4d6355ca45f8f1b4adf7d0595b4e8bcf8
+Author: Martin Pitt <martinpitt@gnome.org>
+Date: Sat May 5 09:28:36 2012 +0200
+
+ Unref GVariants when destroying the wrapper
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=675472
+
+ gi/overrides/GLib.py | 3 +++
+ 1 file changed, 3 insertions(+)
+
+commit d6c091d87c86c8ccc7cb54347fbceccedac61633
+Author: Martin Pitt <martinpitt@gnome.org>
+Date: Sat May 5 09:23:55 2012 +0200
+
+ Fix TestArrayGVariant test cases
+
+ test_array_gvariant_container_in() and test_array_gvariant_full_in()
+ called
+ GIMarshallingTests.array_gvariant_none_in(), presumably a copy&paste
+ error.
+ Actually do what they mean to do now and call the corresponding
+ GIMarshallingTests methods.
+
+ tests/test_gi.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit fda8a069d503e63c76a6b1ba285a181822549059
+Author: Jose Rostagno <joserostagno@vijona.com.ar>
+Date: Sat May 5 08:52:41 2012 +0200
+
+ pygtkcompat: Add gdk.pixbuf_get_formats compat code
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=675489
+
+ Signed-off-by: Martin Pitt <martinpitt@gnome.org>
+
+ gi/pygtkcompat.py | 20 ++++++++++++++++++++
+ tests/test_pygtkcompat.py | 8 ++++++++
+ 2 files changed, 28 insertions(+)
+
+commit 2b49c5f58bb841de7a9077eeeaf996eb9851dab3
+Author: Jose Rostagno <joserostagno@vijona.com.ar>
+Date: Mon Apr 30 13:44:19 2012 -0300
+
+ pygtkcompat: Add some more compat functions
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=675489
+
+ Signed-off-by: Martin Pitt <martinpitt@gnome.org>
+
+ gi/pygtkcompat.py | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+commit 16fbb17a9fd17eeb9f886af99e89a214d328dae1
+Author: Martin Pitt <martinpitt@gnome.org>
+Date: Thu May 3 12:25:04 2012 +0200
+
+ Fix tests for Python 3
+
+ cmp() does not exist any more in Python 3, replace with comparison
+ operators.
+
+ GIMarshallingTests.array_in_nonzero_nonlen() expects a guint8 array,
+ so we
+ can't pass a str (which is an Unicode object in Python 3). Pass a
+ byte array
+ instead.
+
+ tests/test_gi.py | 2 +-
+ tests/test_overrides.py | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+commit fd7f8eefbe8aba0b29d80e3eb9d985d33a268c8a
+Author: Martin Pitt <martinpitt@gnome.org>
+Date: Thu May 3 09:38:56 2012 +0200
+
+ Fix building with --disable-cairo
+
+ Build gobject-introspection's regress.c against cairo, not
+ pycairo/py3cairo. We
+ always need cairo to build, so unconditionally check for this in
+ configure.ac.
+
+ In test_everything.py, gracefully handle the absence of the "cairo"
+ Python
+ module, which we do not have when building without cairo support.
+
+ configure.ac | 3 +++
+ tests/Makefile.am | 4 ++--
+ tests/test_everything.py | 8 +++++++-
+ 3 files changed, 12 insertions(+), 3 deletions(-)
+
+commit 1c5634e6d98c8b67b37a2747951c66f5d8f1907d
+Author: Martin Pitt <martinpitt@gnome.org>
+Date: Thu May 3 09:28:51 2012 +0200
+
+ tests: Fix deprecated assertions
+
+ assertAlmostEquals → assertAlmostEqual
+ assertNotEquals → assertNotEqual
+
+ tests/test_everything.py | 4 ++--
+ tests/test_gi.py | 12 ++++++------
+ tests/test_overrides.py | 10 +++++-----
+ 3 files changed, 13 insertions(+), 13 deletions(-)
+
+commit 07f312e66c07357168098d3f96813d2c997e8dc7
+Author: Martin Pitt <martinpitt@gnome.org>
+Date: Wed May 2 12:08:19 2012 +0200
+
+ Run tests with MALLOC_PERTURB_
+
+ We mostly use the glib allocation functions, but this might
+ help to uncover access to already freed or uninitialized memory in
+ a few edge
+ cases.
+
+ tests/Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit b0740d386c2cbbd153878209b584b568968e4d98
+Author: Martin Pitt <martinpitt@gnome.org>
+Date: Mon Apr 30 16:26:57 2012 +0200
+
+ configure.ac: Post-release bump to 3.3.2
+
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
commit d3977266faadacd3d05705497c1cf51a01a6606f
Author: Martin Pitt <martinpitt@gnome.org>
Date: Mon Apr 30 16:08:09 2012 +0200
diff --git a/Makefile.am b/Makefile.am
index 35e4eb1..89066c3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -98,7 +98,7 @@ release-tag:
release-news:
printf "%-8s%s\n" "$(VERSION)" "`LC_TIME=C date '+%d-%b-%Y'`" > NEWS.tmp
last=`head -n1 NEWS | cut -f1 -d' '`; \
- git log --format='format: - %s (%aN)%n%b' 3.1.92.. | \
+ git log --format='format: - %s (%aN)%n%b' $$last.. | \
sed -n '/^ -/ p; /bugzilla.gnome.org/ { s/^.*id=\([0-9]\+\).*$$/ (#\1)/; p}' >> NEWS.tmp
echo >> NEWS.tmp
cat NEWS >> NEWS.tmp
diff --git a/Makefile.in b/Makefile.in
index 17bdb2b..c03b318 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# Makefile.in generated by automake 1.11.5 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -17,6 +17,23 @@
VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -102,6 +119,11 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
install-pdf-recursive install-ps-recursive install-recursive \
installcheck-recursive installdirs-recursive pdf-recursive \
ps-recursive uninstall-recursive
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
DATA = $(pkgconfig_DATA)
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
@@ -161,6 +183,8 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_LIBS = @CAIRO_LIBS@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@@ -422,7 +446,6 @@ PKG-INFO: $(top_builddir)/config.status $(srcdir)/PKG-INFO.in
cd $(top_builddir) && $(SHELL) ./config.status $@
install-pyexecLTLIBRARIES: $(pyexec_LTLIBRARIES)
@$(NORMAL_INSTALL)
- test -z "$(pyexecdir)" || $(MKDIR_P) "$(DESTDIR)$(pyexecdir)"
@list='$(pyexec_LTLIBRARIES)'; test -n "$(pyexecdir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
@@ -430,6 +453,8 @@ install-pyexecLTLIBRARIES: $(pyexec_LTLIBRARIES)
else :; fi; \
done; \
test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(pyexecdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(pyexecdir)" || exit 1; \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pyexecdir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pyexecdir)"; \
}
@@ -462,8 +487,11 @@ distclean-libtool:
-rm -f libtool config.lt
install-pkgconfigDATA: $(pkgconfig_DATA)
@$(NORMAL_INSTALL)
- test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
@@ -648,13 +676,10 @@ distdir: $(DISTFILES)
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
- test -d "$(distdir)/$$subdir" \
- || $(MKDIR_P) "$(distdir)/$$subdir" \
- || exit 1; \
- fi; \
- done
- @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
+ $(am__make_dryrun) \
+ || test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
$(am__relativize); \
new_distdir=$$reldir; \
@@ -984,7 +1009,7 @@ release-tag:
release-news:
printf "%-8s%s\n" "$(VERSION)" "`LC_TIME=C date '+%d-%b-%Y'`" > NEWS.tmp
last=`head -n1 NEWS | cut -f1 -d' '`; \
- git log --format='format: - %s (%aN)%n%b' 3.1.92.. | \
+ git log --format='format: - %s (%aN)%n%b' $$last.. | \
sed -n '/^ -/ p; /bugzilla.gnome.org/ { s/^.*id=\([0-9]\+\).*$$/ (#\1)/; p}' >> NEWS.tmp
echo >> NEWS.tmp
cat NEWS >> NEWS.tmp
diff --git a/NEWS b/NEWS
index 34e70b0..50fb3f9 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,47 @@
+3.3.2 05-Jun-2012
+ - foreign: Register cairo.Path and cairo.FontOptions foreign structs
+ (Bastian Winkler) (#677388)
+ - Check types in GBoxed assignments (Marien Zwart) (#676603)
+ - [API add] Gtk overrides: Add TreeModelRow.get_previous()
+ (Bastian Winkler) (#677389)
+ - [API add] Add missing GObject.TYPE_VARIANT (Bastian Winkler) (#677387)
+ - Fix boxed type equality (Jasper St. Pierre) (#677249)
+ - Fix TestProperties.testBoxed test (Jose Rostagno) (#676644)
+ - Fix handling of by-reference structs as out parameters
+ (Carlos Garnacho) (#653151)
+ - tests: Add more vfunc checks for GIMarshallingTestsObject
+ (Martin Pitt)
+ - Test caller-allocated GValue out parameter (Martin Pitt) (#653151)
+ - GObject.bind_property: Support transform functions (Bastian Winkler)
+ (#676169)
+ - Fix lookup of vfuncs in parent classes (Carlos Garnacho) (#672864)
+ - tests/test_properties.py: Fix whitespace (Martin Pitt)
+ - gi: Support zero-terminated arrays with length arguments
+ (Jasper St. Pierre) (#677124)
+ - [API add] Add GObject.bind_property method (Simon Feltman) (#675582)
+ - pygtkcompat: Correctly set flags (Jose Rostagno) (#675911)
+ - Gtk overrides: Implement __delitem__ on TreeModel (Jose Rostagno)
+ (#675892)
+ - Gdk Color override should support red/green/blue_float properties
+ (Simon Feltman) (#675579)
+ - Support marshalling of GVariants for closures (Martin Pitt) (#656554)
+ - _pygi_argument_from_object(): Check for compatible data type
+ (Martin Pitt)
+ - pygtkcompat: Fix color conversion (Martin Pitt)
+ - test_gi: Check setting properties in constructor (Martin Pitt)
+ - Support getting and setting GStrv properties (Martin Pitt)
+ - Support defining GStrv properties from Python (Martin Pitt)
+ - Add GObject.TYPE_STRV constant (Martin Pitt)
+ - Unref GVariants when destroying the wrapper (Martin Pitt) (#675472)
+ - Fix TestArrayGVariant test cases (Martin Pitt)
+ - pygtkcompat: Add gdk.pixbuf_get_formats compat code (Jose Rostagno)
+ (#675489)
+ - pygtkcompat: Add some more compat functions (Jose Rostagno) (#675489)
+ - Fix tests for Python 3 (Martin Pitt)
+ - Fix building with --disable-cairo (Martin Pitt)
+ - tests: Fix deprecated assertions (Martin Pitt)
+ - Run tests with MALLOC_PERTURB_ (Martin Pitt)
+
3.3.1 30-Apr-2012
- GSettings: allow extra keyword arguments (Giovanni Campagna)
(#675105)
@@ -13,8 +57,8 @@
(Martin Pitt) (#667954)
- Add test case for Gtk.ListStore custom sort (Martin Pitt) (#674475)
- GTK overrides: Add missing keyword arguments (Martin Pitt) (#660018)
- - Add missing override for TreeModel.iter_previous() (Martin Pitt)
- (#660018)
+ - [API change] Add missing override for TreeModel.iter_previous()
+ (Martin Pitt) (#660018)
- pygi-convert.py: Drop obsolete drag method conversions (Martin Pitt)
(#652860)
- tests: Replace deprecated assertEquals() with assertEqual()
@@ -27,15 +71,16 @@
- Fix test_mainloop.py for Python 3 (Martin Pitt)
- Make callback exception propagation test stricter (Martin Pitt)
(#616279)
- - Add context management to freeze_notify() and handler_block().
- (Simon Feltman) (#672324)
+ - [API add] Add context management to freeze_notify() and
+ handler_block(). (Simon Feltman) (#672324)
- Add support for GFlags properties (Martin Pitt) (#620943)
- - Wrap GLib.Source.is_destroyed() method (Martin Pitt) (#524719)
+ - [API add] Wrap GLib.Source.is_destroyed() method (Martin Pitt)
+ (#524719)
- Fix error message when trying to override a non-GI class
(Martin Pitt) (#646667)
- Fix segfault when accessing __grefcount__ before creating the GObject
(Steve Frécinaux) (#640434)
- - Do not bind gobject_get_data() and gobject_set_data()
+ - [API change] Do not bind gobject_get_data() and gobject_set_data()
(Steve Frécinaux) (#641944)
- Add test case for multiple GLib.MainLoop instances (Martin Pitt)
(#663068)
diff --git a/PKG-INFO b/PKG-INFO
index 1fc0db5..492a714 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: PyGObject
-Version: 3.3.1
+Version: 3.3.2
Summary: Python bindings for GObject
Home-page: http://www.pygtk.org/
Author: James Henstridge
@@ -8,7 +8,7 @@ Author-email: james@daa.com.au
Maintainer: Johan Dahlin
Maintainer-email: johan@gnome.org
License: GNU LGPL
-Download-url: ftp://ftp.gnome.org/pub/GNOME/sources/pygobject/3.3/pygobject-3.3.1.tar.gz
+Download-url: ftp://ftp.gnome.org/pub/GNOME/sources/pygobject/3.3/pygobject-3.3.2.tar.gz
Description: Python bindings for GLib and GObject
Platform: POSIX, Windows
Classifier: Development Status :: 5 - Production/Stable
diff --git a/aclocal.m4 b/aclocal.m4
index f50ce64..1c87fc5 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,4 +1,4 @@
-# generated automatically by aclocal 1.11.3 -*- Autoconf -*-
+# generated automatically by aclocal 1.11.5 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
@@ -14,8 +14,8 @@
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
-[m4_warning([this file was generated for autoconf 2.68.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
+[m4_warning([this file was generated for autoconf 2.69.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.])])
@@ -38,7 +38,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.11'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
-m4_if([$1], [1.11.3], [],
+m4_if([$1], [1.11.5], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@@ -54,7 +54,7 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.11.3])dnl
+[AM_AUTOMAKE_VERSION([1.11.5])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
diff --git a/compile b/compile
index b1f4749..862a14e 100755
--- a/compile
+++ b/compile
@@ -1,7 +1,7 @@
#! /bin/sh
# Wrapper for compilers which do not understand '-c -o'.
-scriptversion=2012-01-04.17; # UTC
+scriptversion=2012-03-05.13; # UTC
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009, 2010, 2012 Free
# Software Foundation, Inc.
@@ -79,6 +79,48 @@ func_file_conv ()
esac
}
+# func_cl_dashL linkdir
+# Make cl look for libraries in LINKDIR
+func_cl_dashL ()
+{
+ func_file_conv "$1"
+ if test -z "$lib_path"; then
+ lib_path=$file
+ else
+ lib_path="$lib_path;$file"
+ fi
+ linker_opts="$linker_opts -LIBPATH:$file"
+}
+
+# func_cl_dashl library
+# Do a library search-path lookup for cl
+func_cl_dashl ()
+{
+ lib=$1
+ found=no
+ save_IFS=$IFS
+ IFS=';'
+ for dir in $lib_path $LIB
+ do
+ IFS=$save_IFS
+ if $shared && test -f "$dir/$lib.dll.lib"; then
+ found=yes
+ lib=$dir/$lib.dll.lib
+ break
+ fi
+ if test -f "$dir/$lib.lib"; then
+ found=yes
+ lib=$dir/$lib.lib
+ break
+ fi
+ done
+ IFS=$save_IFS
+
+ if test "$found" != yes; then
+ lib=$lib.lib
+ fi
+}
+
# func_cl_wrapper cl arg...
# Adjust compile command to suit cl
func_cl_wrapper ()
@@ -109,43 +151,34 @@ func_cl_wrapper ()
;;
esac
;;
+ -I)
+ eat=1
+ func_file_conv "$2" mingw
+ set x "$@" -I"$file"
+ shift
+ ;;
-I*)
func_file_conv "${1#-I}" mingw
set x "$@" -I"$file"
shift
;;
+ -l)
+ eat=1
+ func_cl_dashl "$2"
+ set x "$@" "$lib"
+ shift
+ ;;
-l*)
- lib=${1#-l}
- found=no
- save_IFS=$IFS
- IFS=';'
- for dir in $lib_path $LIB
- do
- IFS=$save_IFS
- if $shared && test -f "$dir/$lib.dll.lib"; then
- found=yes
- set x "$@" "$dir/$lib.dll.lib"
- break
- fi
- if test -f "$dir/$lib.lib"; then
- found=yes
- set x "$@" "$dir/$lib.lib"
- break
- fi
- done
- IFS=$save_IFS
-
- test "$found" != yes && set x "$@" "$lib.lib"
+ func_cl_dashl "${1#-l}"
+ set x "$@" "$lib"
shift
;;
+ -L)
+ eat=1
+ func_cl_dashL "$2"
+ ;;
-L*)
- func_file_conv "${1#-L}"
- if test -z "$lib_path"; then
- lib_path=$file
- else
- lib_path="$lib_path;$file"
- fi
- linker_opts="$linker_opts -LIBPATH:$file"
+ func_cl_dashL "${1#-L}"
;;
-static)
shared=false
diff --git a/configure b/configure
index 797ee73..77fdea4 100755
--- a/configure
+++ b/configure
@@ -1,13 +1,11 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for pygobject 3.3.1.
+# Generated by GNU Autoconf 2.69 for pygobject 3.3.2.
#
# Report bugs to <http://bugzilla.gnome.org/enter_bug.cgi?product=pygobject>.
#
#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
#
#
# This configure script is free software; the Free Software Foundation
@@ -136,6 +134,31 @@ export LANGUAGE
# CDPATH.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+# Use a proper internal environment variable to ensure we don't fall
+ # into an infinite loop, continuously re-executing ourselves.
+ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+ _as_can_reexec=no; export _as_can_reexec;
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+ fi
+ # We don't want this to propagate to other subprocesses.
+ { _as_can_reexec=; unset _as_can_reexec;}
if test "x$CONFIG_SHELL" = x; then
as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
@@ -169,7 +192,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
else
exitcode=1; echo positional parameters were not saved.
fi
-test x\$exitcode = x0 || exit 1"
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
@@ -222,21 +246,25 @@ IFS=$as_save_IFS
if test "x$CONFIG_SHELL" != x; then :
- # We cannot yet assume a decent shell, so we have to provide a
- # neutralization value for shells without unset; and this also
- # works around shells that cannot unset nonexistent variables.
- # Preserve -v and -x to the replacement shell.
- BASH_ENV=/dev/null
- ENV=/dev/null
- (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
- export CONFIG_SHELL
- case $- in # ((((
- *v*x* | *x*v* ) as_opts=-vx ;;
- *v* ) as_opts=-v ;;
- *x* ) as_opts=-x ;;
- * ) as_opts= ;;
- esac
- exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+ export CONFIG_SHELL
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
fi
if test x$as_have_required = xno; then :
@@ -340,6 +368,14 @@ $as_echo X"$as_dir" |
} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
@@ -461,6 +497,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
chmod +x "$as_me.lineno" ||
{ $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+ # already done that, so ensure we don't try to do so again and fall
+ # in an infinite loop. This has already happened in practice.
+ _as_can_reexec=no; export _as_can_reexec
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
# original and so on. Autoconf is especially sensitive to this).
@@ -495,16 +535,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
+ # In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -516,28 +556,8 @@ else
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -571,8 +591,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='pygobject'
PACKAGE_TARNAME='pygobject'
-PACKAGE_VERSION='3.3.1'
-PACKAGE_STRING='pygobject 3.3.1'
+PACKAGE_VERSION='3.3.2'
+PACKAGE_STRING='pygobject 3.3.2'
PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=pygobject'
PACKAGE_URL=''
@@ -626,6 +646,8 @@ PYCAIRO_CFLAGS
GI_DATADIR
GI_LIBS
GI_CFLAGS
+CAIRO_LIBS
+CAIRO_CFLAGS
GIO_LIBS
GIO_CFLAGS
LIBFFI_PC
@@ -817,6 +839,8 @@ FFI_CFLAGS
FFI_LIBS
GIO_CFLAGS
GIO_LIBS
+CAIRO_CFLAGS
+CAIRO_LIBS
GI_CFLAGS
GI_LIBS
PYCAIRO_CFLAGS
@@ -1276,8 +1300,6 @@ target=$target_alias
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
- $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used" >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
@@ -1363,7 +1385,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures pygobject 3.3.1 to adapt to many kinds of systems.
+\`configure' configures pygobject 3.3.2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1433,7 +1455,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of pygobject 3.3.1:";;
+ short | recursive ) echo "Configuration of pygobject 3.3.2:";;
esac
cat <<\_ACEOF
@@ -1486,6 +1508,9 @@ Some influential environment variables:
FFI_LIBS linker flags for FFI, overriding pkg-config
GIO_CFLAGS C compiler flags for GIO, overriding pkg-config
GIO_LIBS linker flags for GIO, overriding pkg-config
+ CAIRO_CFLAGS
+ C compiler flags for CAIRO, overriding pkg-config
+ CAIRO_LIBS linker flags for CAIRO, overriding pkg-config
GI_CFLAGS C compiler flags for GI, overriding pkg-config
GI_LIBS linker flags for GI, overriding pkg-config
PYCAIRO_CFLAGS
@@ -1559,10 +1584,10 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-pygobject configure 3.3.1
-generated by GNU Autoconf 2.68
+pygobject configure 3.3.2
+generated by GNU Autoconf 2.69
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -1638,7 +1663,7 @@ $as_echo "$ac_try_echo"; } >&5
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
+ test -x conftest$ac_exeext
}; then :
ac_retval=0
else
@@ -1837,8 +1862,8 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by pygobject $as_me 3.3.1, which was
-generated by GNU Autoconf 2.68. Invocation command line was
+It was created by pygobject $as_me 3.3.2, which was
+generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2201,9 +2226,9 @@ $as_echo "#define PYGOBJECT_MINOR_VERSION 3" >>confdefs.h
PYGOBJECT_MINOR_VERSION=3
-$as_echo "#define PYGOBJECT_MICRO_VERSION 1" >>confdefs.h
+$as_echo "#define PYGOBJECT_MICRO_VERSION 2" >>confdefs.h
-PYGOBJECT_MICRO_VERSION=1
+PYGOBJECT_MICRO_VERSION=2
ac_config_headers="$ac_config_headers config.h"
@@ -2315,7 +2340,7 @@ case $as_dir/ in #((
# by default.
for ac_prog in ginstall scoinst install; do
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
if test $ac_prog = install &&
grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
@@ -2484,7 +2509,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_STRIP="${ac_tool_prefix}strip"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2524,7 +2549,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_STRIP="strip"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2575,7 +2600,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_prog in mkdir gmkdir; do
for ac_exec_ext in '' $ac_executable_extensions; do
- { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+ as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
'mkdir (GNU coreutils) '* | \
'mkdir (coreutils) '* | \
@@ -2628,7 +2653,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_AWK="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2714,7 +2739,7 @@ fi
# Define the identity of the package.
PACKAGE='pygobject'
- VERSION='3.3.1'
+ VERSION='3.3.2'
cat >>confdefs.h <<_ACEOF
@@ -2948,7 +2973,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_AS="${ac_tool_prefix}as"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2988,7 +3013,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_AS="as"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3040,7 +3065,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3080,7 +3105,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_DLLTOOL="dlltool"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3132,7 +3157,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3172,7 +3197,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OBJDUMP="objdump"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3409,7 +3434,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3449,7 +3474,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3502,7 +3527,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3543,7 +3568,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
@@ -3601,7 +3626,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3645,7 +3670,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4091,8 +4116,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdarg.h>
#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+struct stat;
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
@@ -4327,7 +4351,7 @@ do
for ac_prog in sed gsed; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+ as_fn_executable_p "$ac_path_SED" || continue
# Check for GNU ac_path_SED and select it if it is found.
# Check for GNU $ac_path_SED
case `"$ac_path_SED" --version 2>&1` in
@@ -4403,7 +4427,7 @@ do
for ac_prog in grep ggrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+ as_fn_executable_p "$ac_path_GREP" || continue
# Check for GNU ac_path_GREP and select it if it is found.
# Check for GNU $ac_path_GREP
case `"$ac_path_GREP" --version 2>&1` in
@@ -4469,7 +4493,7 @@ do
for ac_prog in egrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+ as_fn_executable_p "$ac_path_EGREP" || continue
# Check for GNU ac_path_EGREP and select it if it is found.
# Check for GNU $ac_path_EGREP
case `"$ac_path_EGREP" --version 2>&1` in
@@ -4536,7 +4560,7 @@ do
for ac_prog in fgrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
+ as_fn_executable_p "$ac_path_FGREP" || continue
# Check for GNU ac_path_FGREP and select it if it is found.
# Check for GNU $ac_path_FGREP
case `"$ac_path_FGREP" --version 2>&1` in
@@ -4792,7 +4816,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4836,7 +4860,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5260,7 +5284,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5300,7 +5324,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OBJDUMP="objdump"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5603,7 +5627,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5643,7 +5667,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_DLLTOOL="dlltool"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5744,7 +5768,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5788,7 +5812,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_AR="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5913,7 +5937,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_STRIP="${ac_tool_prefix}strip"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5953,7 +5977,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_STRIP="strip"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6012,7 +6036,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6052,7 +6076,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_RANLIB="ranlib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6701,7 +6725,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6741,7 +6765,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6821,7 +6845,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6861,7 +6885,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6913,7 +6937,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6953,7 +6977,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_NMEDIT="nmedit"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7005,7 +7029,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7045,7 +7069,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_LIPO="lipo"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7097,7 +7121,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7137,7 +7161,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OTOOL="otool"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7189,7 +7213,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7229,7 +7253,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OTOOL64="otool64"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -11987,16 +12011,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
+ # In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -12056,28 +12080,16 @@ else
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -12118,8 +12130,8 @@ Usage: $0 [OPTIONS]
Report bugs to <bug-libtool@gnu.org>."
lt_cl_version="\
-pygobject config.lt 3.3.1
-configured by $0, generated by GNU Autoconf 2.68.
+pygobject config.lt 3.3.2
+configured by $0, generated by GNU Autoconf 2.69.
Copyright (C) 2011 Free Software Foundation, Inc.
This config.lt script is free software; the Free Software Foundation
@@ -13163,7 +13175,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -13203,7 +13215,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -13256,7 +13268,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -13297,7 +13309,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
@@ -13355,7 +13367,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -13399,7 +13411,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -13595,8 +13607,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdarg.h>
#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+struct stat;
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
@@ -13831,7 +13842,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -13871,7 +13882,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -13924,7 +13935,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -13965,7 +13976,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
@@ -14023,7 +14034,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -14067,7 +14078,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -14263,8 +14274,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdarg.h>
#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+struct stat;
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
@@ -14689,7 +14699,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -14866,7 +14876,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -15284,7 +15294,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -15327,7 +15337,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -15813,6 +15823,99 @@ $as_echo "yes" >&6; }
fi
+# we always need cairo (not pycairo) for building the tests
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAIRO" >&5
+$as_echo_n "checking for CAIRO... " >&6; }
+
+if test -n "$CAIRO_CFLAGS"; then
+ pkg_cv_CAIRO_CFLAGS="$CAIRO_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cairo cairo-gobject\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "cairo cairo-gobject") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_CAIRO_CFLAGS=`$PKG_CONFIG --cflags "cairo cairo-gobject" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$CAIRO_LIBS"; then
+ pkg_cv_CAIRO_LIBS="$CAIRO_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cairo cairo-gobject\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "cairo cairo-gobject") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_CAIRO_LIBS=`$PKG_CONFIG --libs "cairo cairo-gobject" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ CAIRO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "cairo cairo-gobject" 2>&1`
+ else
+ CAIRO_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "cairo cairo-gobject" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$CAIRO_PKG_ERRORS" >&5
+
+ as_fn_error $? "Package requirements (cairo cairo-gobject) were not met:
+
+$CAIRO_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables CAIRO_CFLAGS
+and CAIRO_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables CAIRO_CFLAGS
+and CAIRO_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
+else
+ CAIRO_CFLAGS=$pkg_cv_CAIRO_CFLAGS
+ CAIRO_LIBS=$pkg_cv_CAIRO_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+fi
+
# Check whether --enable-cairo was given.
if test "${enable_cairo+set}" = set; then :
enableval=$enable_cairo; enable_cairo=$enableval
@@ -15831,16 +15934,16 @@ if test -n "$GI_CFLAGS"; then
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.31.0
- gobject-introspection-1.0 >= 1.31.20
+ gobject-introspection-1.0 >= 1.33.0
\""; } >&5
($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.31.0
- gobject-introspection-1.0 >= 1.31.20
+ gobject-introspection-1.0 >= 1.33.0
") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_GI_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.31.0
- gobject-introspection-1.0 >= 1.31.20
+ gobject-introspection-1.0 >= 1.33.0
" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
@@ -15854,16 +15957,16 @@ if test -n "$GI_LIBS"; then
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.31.0
- gobject-introspection-1.0 >= 1.31.20
+ gobject-introspection-1.0 >= 1.33.0
\""; } >&5
($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.31.0
- gobject-introspection-1.0 >= 1.31.20
+ gobject-introspection-1.0 >= 1.33.0
") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_GI_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.31.0
- gobject-introspection-1.0 >= 1.31.20
+ gobject-introspection-1.0 >= 1.33.0
" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes
else
@@ -15886,18 +15989,18 @@ else
fi
if test $_pkg_short_errors_supported = yes; then
GI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glib-2.0 >= 2.31.0
- gobject-introspection-1.0 >= 1.31.20
+ gobject-introspection-1.0 >= 1.33.0
" 2>&1`
else
GI_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glib-2.0 >= 2.31.0
- gobject-introspection-1.0 >= 1.31.20
+ gobject-introspection-1.0 >= 1.33.0
" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$GI_PKG_ERRORS" >&5
as_fn_error $? "Package requirements (glib-2.0 >= 2.31.0
- gobject-introspection-1.0 >= 1.31.20
+ gobject-introspection-1.0 >= 1.33.0
) were not met:
$GI_PKG_ERRORS
@@ -16717,16 +16820,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
+ # In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -16786,28 +16889,16 @@ else
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -16828,8 +16919,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by pygobject $as_me 3.3.1, which was
-generated by GNU Autoconf 2.68. Invocation command line was
+This file was extended by pygobject $as_me 3.3.2, which was
+generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -16894,11 +16985,11 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-pygobject config.status 3.3.1
-configured by $0, generated by GNU Autoconf 2.68,
+pygobject config.status 3.3.2
+configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -16989,7 +17080,7 @@ fi
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
- set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
shift
\$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
CONFIG_SHELL='$SHELL'
diff --git a/configure.ac b/configure.ac
index 92d518d..08d6a9c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12,11 +12,11 @@ m4_define(python3_min_ver, 3.1)
dnl the pygobject version number
m4_define(pygobject_major_version, 3)
m4_define(pygobject_minor_version, 3)
-m4_define(pygobject_micro_version, 1)
+m4_define(pygobject_micro_version, 2)
m4_define(pygobject_version, pygobject_major_version.pygobject_minor_version.pygobject_micro_version)
dnl versions of packages we require ...
-m4_define(introspection_required_version, 1.31.20)
+m4_define(introspection_required_version, 1.33.0)
m4_define(py2cairo_required_version, 1.2.0)
m4_define(py3cairo_required_version, 1.10.0)
m4_define(glib_required_version, 2.31.0)
@@ -184,6 +184,9 @@ AC_SUBST(LIBFFI_PC)
dnl gio
PKG_CHECK_MODULES(GIO, gio-2.0 >= gio_required_version)
+# we always need cairo (not pycairo) for building the tests
+PKG_CHECK_MODULES(CAIRO, cairo cairo-gobject)
+
AC_ARG_ENABLE(cairo,
AC_HELP_STRING([--enable-cairo], [Enable Cairo bindings using introspection information]),
enable_cairo=$enableval,
diff --git a/depcomp b/depcomp
index bd0ac08..25a39e6 100755
--- a/depcomp
+++ b/depcomp
@@ -1,10 +1,10 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
-scriptversion=2011-12-04.11; # UTC
+scriptversion=2012-03-27.16; # UTC
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010,
-# 2011 Free Software Foundation, Inc.
+# 2011, 2012 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@ scriptversion=2011-12-04.11; # UTC
case $1 in
'')
- echo "$0: No command. Try \`$0 --help' for more information." 1>&2
+ echo "$0: No command. Try '$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
@@ -40,8 +40,8 @@ as side-effects.
Environment variables:
depmode Dependency tracking mode.
- source Source file read by `PROGRAMS ARGS'.
- object Object file output by `PROGRAMS ARGS'.
+ source Source file read by 'PROGRAMS ARGS'.
+ object Object file output by 'PROGRAMS ARGS'.
DEPDIR directory where to store dependencies.
depfile Dependency file to output.
tmpdepfile Temporary file to use when outputting dependencies.
@@ -57,6 +57,12 @@ EOF
;;
esac
+# A tabulation character.
+tab=' '
+# A newline character.
+nl='
+'
+
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2
exit 1
@@ -102,6 +108,12 @@ if test "$depmode" = msvc7msys; then
depmode=msvc7
fi
+if test "$depmode" = xlc; then
+ # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations.
+ gccflag=-qmakedep=gcc,-MF
+ depmode=gcc
+fi
+
case "$depmode" in
gcc3)
## gcc 3 implements dependency tracking that does exactly what
@@ -156,15 +168,14 @@ gcc)
## The second -e expression handles DOS-style file names with drive letters.
sed -e 's/^[^:]*: / /' \
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
-## This next piece of magic avoids the `deleted header file' problem.
+## This next piece of magic avoids the "deleted header file" problem.
## The problem is that when a header file which appears in a .P file
## is deleted, the dependency causes make to die (because there is
## typically no way to rebuild the header). We avoid this by adding
## dummy dependencies for each header file. Too bad gcc doesn't do
## this for us directly.
- tr ' ' '
-' < "$tmpdepfile" |
-## Some versions of gcc put a space before the `:'. On the theory
+ tr ' ' "$nl" < "$tmpdepfile" |
+## Some versions of gcc put a space before the ':'. On the theory
## that the space means something, we add a space to the output as
## well. hp depmode also adds that space, but also prefixes the VPATH
## to the object. Take care to not repeat it in the output.
@@ -203,18 +214,15 @@ sgi)
# clever and replace this with sed code, as IRIX sed won't handle
# lines with more than a fixed number of characters (4096 in
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
- # the IRIX cc adds comments like `#:fec' to the end of the
+ # the IRIX cc adds comments like '#:fec' to the end of the
# dependency line.
- tr ' ' '
-' < "$tmpdepfile" \
+ tr ' ' "$nl" < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
- tr '
-' ' ' >> "$depfile"
+ tr "$nl" ' ' >> "$depfile"
echo >> "$depfile"
# The second pass generates a dummy entry for each header file.
- tr ' ' '
-' < "$tmpdepfile" \
+ tr ' ' "$nl" < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
>> "$depfile"
else
@@ -226,10 +234,17 @@ sgi)
rm -f "$tmpdepfile"
;;
+xlc)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
aix)
# The C for AIX Compiler uses -M and outputs the dependencies
# in a .u file. In older versions, this file always lives in the
- # current directory. Also, the AIX compiler puts `$object:' at the
+ # current directory. Also, the AIX compiler puts '$object:' at the
# start of each line; $object doesn't have directory information.
# Version 6 uses the directory in both cases.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
@@ -259,12 +274,11 @@ aix)
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
- # Each line is of the form `foo.o: dependent.h'.
+ # Each line is of the form 'foo.o: dependent.h'.
# Do two passes, one to just change these to
- # `$object: dependent.h' and one to simply `dependent.h:'.
+ # '$object: dependent.h' and one to simply 'dependent.h:'.
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
- # That's a tab and a space in the [].
- sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+ sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
@@ -275,23 +289,26 @@ aix)
;;
icc)
- # Intel's C compiler understands `-MD -MF file'. However on
- # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+ # Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'.
+ # However on
+ # $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c
# ICC 7.0 will fill foo.d with something like
# foo.o: sub/foo.c
# foo.o: sub/foo.h
- # which is wrong. We want:
+ # which is wrong. We want
# sub/foo.o: sub/foo.c
# sub/foo.o: sub/foo.h
# sub/foo.c:
# sub/foo.h:
# ICC 7.1 will output
# foo.o: sub/foo.c sub/foo.h
- # and will wrap long lines using \ :
+ # and will wrap long lines using '\':
# foo.o: sub/foo.c ... \
# sub/foo.h ... \
# ...
-
+ # tcc 0.9.26 (FIXME still under development at the moment of writing)
+ # will emit a similar output, but also prepend the continuation lines
+ # with horizontal tabulation characters.
"$@" -MD -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
@@ -300,15 +317,21 @@ icc)
exit $stat
fi
rm -f "$depfile"
- # Each line is of the form `foo.o: dependent.h',
- # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+ # Each line is of the form 'foo.o: dependent.h',
+ # or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'.
# Do two passes, one to just change these to
- # `$object: dependent.h' and one to simply `dependent.h:'.
- sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
- # Some versions of the HPUX 10.20 sed can't process this invocation
- # correctly. Breaking it into two sed invocations is a workaround.
- sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
- sed -e 's/$/ :/' >> "$depfile"
+ # '$object: dependent.h' and one to simply 'dependent.h:'.
+ sed -e "s/^[ $tab][ $tab]*/ /" -e "s,^[^:]*:,$object :," \
+ < "$tmpdepfile" > "$depfile"
+ sed '
+ s/[ '"$tab"'][ '"$tab"']*/ /g
+ s/^ *//
+ s/ *\\*$//
+ s/^[^:]*: *//
+ /^$/d
+ /:$/d
+ s/$/ :/
+ ' < "$tmpdepfile" >> "$depfile"
rm -f "$tmpdepfile"
;;
@@ -344,7 +367,7 @@ hp2)
done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
- # Add `dependent.h:' lines.
+ # Add 'dependent.h:' lines.
sed -ne '2,${
s/^ *//
s/ \\*$//
@@ -359,9 +382,9 @@ hp2)
tru64)
# The Tru64 compiler uses -MD to generate dependencies as a side
- # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
+ # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
- # dependencies in `foo.d' instead, so we check for that too.
+ # dependencies in 'foo.d' instead, so we check for that too.
# Subdirectories are respected.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
@@ -407,8 +430,7 @@ tru64)
done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
- # That's a tab and a space in the [].
- sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+ sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
@@ -443,11 +465,11 @@ msvc7)
p
}' | $cygpath_u | sort -u | sed -n '
s/ /\\ /g
-s/\(.*\)/ \1 \\/p
+s/\(.*\)/'"$tab"'\1 \\/p
s/.\(.*\) \\/\1:/
H
$ {
- s/.*/ /
+ s/.*/'"$tab"'/
G
p
}' >> "$depfile"
@@ -478,7 +500,7 @@ dashmstdout)
shift
fi
- # Remove `-o $object'.
+ # Remove '-o $object'.
IFS=" "
for arg
do
@@ -498,15 +520,14 @@ dashmstdout)
done
test -z "$dashmflag" && dashmflag=-M
- # Require at least two characters before searching for `:'
+ # Require at least two characters before searching for ':'
# in the target name. This is to cope with DOS-style filenames:
- # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+ # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
"$@" $dashmflag |
- sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
+ sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
- tr ' ' '
-' < "$tmpdepfile" | \
+ tr ' ' "$nl" < "$tmpdepfile" | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
@@ -562,8 +583,7 @@ makedepend)
# makedepend may prepend the VPATH from the source file name to the object.
# No need to regex-escape $object, excess matching of '.' is harmless.
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
- sed '1,2d' "$tmpdepfile" | tr ' ' '
-' | \
+ sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
@@ -583,7 +603,7 @@ cpp)
shift
fi
- # Remove `-o $object'.
+ # Remove '-o $object'.
IFS=" "
for arg
do
@@ -652,8 +672,8 @@ msvisualcpp)
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
- sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
- echo " " >> "$depfile"
+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
+ echo "$tab" >> "$depfile"
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile"
;;
diff --git a/examples/Makefile.in b/examples/Makefile.in
index 7931d4b..00924a1 100644
--- a/examples/Makefile.in
+++ b/examples/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# Makefile.in generated by automake 1.11.5 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -15,6 +15,23 @@
@SET_MAKE@
VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -55,6 +72,11 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
SOURCES =
DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
@@ -66,6 +88,8 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_LIBS = @CAIRO_LIBS@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
diff --git a/gi/Makefile.in b/gi/Makefile.in
index 87ad450..7defbd6 100644
--- a/gi/Makefile.in
+++ b/gi/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# Makefile.in generated by automake 1.11.5 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -16,6 +16,23 @@
@SET_MAKE@
VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -147,6 +164,11 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
install-pdf-recursive install-ps-recursive install-recursive \
installcheck-recursive installdirs-recursive pdf-recursive \
ps-recursive uninstall-recursive
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
am__py_compile = PYTHON=$(PYTHON) $(SHELL) $(py_compile)
py_compile = $(top_srcdir)/py-compile
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
@@ -193,6 +215,8 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_LIBS = @CAIRO_LIBS@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@@ -484,7 +508,6 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(am__aclocal_m4_deps):
install-pygiLTLIBRARIES: $(pygi_LTLIBRARIES)
@$(NORMAL_INSTALL)
- test -z "$(pygidir)" || $(MKDIR_P) "$(DESTDIR)$(pygidir)"
@list='$(pygi_LTLIBRARIES)'; test -n "$(pygidir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
@@ -492,6 +515,8 @@ install-pygiLTLIBRARIES: $(pygi_LTLIBRARIES)
else :; fi; \
done; \
test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(pygidir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(pygidir)" || exit 1; \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pygidir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pygidir)"; \
}
@@ -713,8 +738,11 @@ clean-libtool:
-rm -rf .libs _libs
install-pygiPYTHON: $(pygi_PYTHON)
@$(NORMAL_INSTALL)
- test -z "$(pygidir)" || $(MKDIR_P) "$(DESTDIR)$(pygidir)"
@list='$(pygi_PYTHON)'; dlist=; list2=; test -n "$(pygidir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(pygidir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(pygidir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
if test -f $$b$$p; then \
@@ -914,13 +942,10 @@ distdir: $(DISTFILES)
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
- test -d "$(distdir)/$$subdir" \
- || $(MKDIR_P) "$(distdir)/$$subdir" \
- || exit 1; \
- fi; \
- done
- @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
+ $(am__make_dryrun) \
+ || test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
$(am__relativize); \
new_distdir=$$reldir; \
diff --git a/gi/_glib/Makefile.in b/gi/_glib/Makefile.in
index 950f540..02700bc 100644
--- a/gi/_glib/Makefile.in
+++ b/gi/_glib/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# Makefile.in generated by automake 1.11.5 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -16,6 +16,23 @@
@SET_MAKE@
VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -141,6 +158,11 @@ SOURCES = $(_glib_la_SOURCES) \
$(libpyglib_gi_2_0_@PYTHON_BASENAME@_la_SOURCES)
DIST_SOURCES = $(_glib_la_SOURCES) \
$(libpyglib_gi_2_0_@PYTHON_BASENAME@_la_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
am__py_compile = PYTHON=$(PYTHON) $(SHELL) $(py_compile)
py_compile = $(top_srcdir)/py-compile
ETAGS = etags
@@ -156,6 +178,8 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_LIBS = @CAIRO_LIBS@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@@ -409,7 +433,6 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(am__aclocal_m4_deps):
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL)
- test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
@@ -417,6 +440,8 @@ install-libLTLIBRARIES: $(lib_LTLIBRARIES)
else :; fi; \
done; \
test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
}
@@ -440,7 +465,6 @@ clean-libLTLIBRARIES:
done
install-pyglibLTLIBRARIES: $(pyglib_LTLIBRARIES)
@$(NORMAL_INSTALL)
- test -z "$(pyglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pyglibdir)"
@list='$(pyglib_LTLIBRARIES)'; test -n "$(pyglibdir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
@@ -448,6 +472,8 @@ install-pyglibLTLIBRARIES: $(pyglib_LTLIBRARIES)
else :; fi; \
done; \
test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(pyglibdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(pyglibdir)" || exit 1; \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pyglibdir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pyglibdir)"; \
}
@@ -581,8 +607,11 @@ clean-libtool:
-rm -rf .libs _libs
install-pyglibPYTHON: $(pyglib_PYTHON)
@$(NORMAL_INSTALL)
- test -z "$(pyglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pyglibdir)"
@list='$(pyglib_PYTHON)'; dlist=; list2=; test -n "$(pyglibdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(pyglibdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(pyglibdir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
if test -f $$b$$p; then \
diff --git a/gi/_gobject/Makefile.in b/gi/_gobject/Makefile.in
index 56caedf..9a5e1ef 100644
--- a/gi/_gobject/Makefile.in
+++ b/gi/_gobject/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# Makefile.in generated by automake 1.11.5 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -17,6 +17,23 @@
VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
@@ -128,6 +145,11 @@ am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
SOURCES = $(_gobject_la_SOURCES)
DIST_SOURCES = $(_gobject_la_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
am__py_compile = PYTHON=$(PYTHON) $(SHELL) $(py_compile)
py_compile = $(top_srcdir)/py-compile
HEADERS = $(pkginclude_HEADERS)
@@ -145,6 +167,8 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_LIBS = @CAIRO_LIBS@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@@ -390,7 +414,6 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(am__aclocal_m4_deps):
install-pygobjectLTLIBRARIES: $(pygobject_LTLIBRARIES)
@$(NORMAL_INSTALL)
- test -z "$(pygobjectdir)" || $(MKDIR_P) "$(DESTDIR)$(pygobjectdir)"
@list='$(pygobject_LTLIBRARIES)'; test -n "$(pygobjectdir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
@@ -398,6 +421,8 @@ install-pygobjectLTLIBRARIES: $(pygobject_LTLIBRARIES)
else :; fi; \
done; \
test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(pygobjectdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(pygobjectdir)" || exit 1; \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pygobjectdir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pygobjectdir)"; \
}
@@ -529,8 +554,11 @@ clean-libtool:
-rm -rf .libs _libs
install-pygobjectPYTHON: $(pygobject_PYTHON)
@$(NORMAL_INSTALL)
- test -z "$(pygobjectdir)" || $(MKDIR_P) "$(DESTDIR)$(pygobjectdir)"
@list='$(pygobject_PYTHON)'; dlist=; list2=; test -n "$(pygobjectdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(pygobjectdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(pygobjectdir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
if test -f $$b$$p; then \
@@ -564,8 +592,11 @@ uninstall-pygobjectPYTHON:
exit $$st
install-pkgincludeHEADERS: $(pkginclude_HEADERS)
@$(NORMAL_INSTALL)
- test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)"
@list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
diff --git a/gi/_gobject/__init__.py b/gi/_gobject/__init__.py
index 8184130..d10d8e0 100644
--- a/gi/_gobject/__init__.py
+++ b/gi/_gobject/__init__.py
@@ -178,6 +178,8 @@ TYPE_OBJECT = constants.TYPE_OBJECT
TYPE_PYOBJECT = constants.TYPE_PYOBJECT
TYPE_GTYPE = constants.TYPE_GTYPE
TYPE_UNICHAR = constants.TYPE_UNICHAR
+TYPE_STRV = constants.TYPE_STRV
+TYPE_VARIANT = constants.TYPE_VARIANT
G_MINFLOAT = constants.G_MINFLOAT
G_MAXFLOAT = constants.G_MAXFLOAT
G_MINDOUBLE = constants.G_MINDOUBLE
diff --git a/gi/_gobject/constants.py b/gi/_gobject/constants.py
index 45234bc..3f83a3a 100644
--- a/gi/_gobject/constants.py
+++ b/gi/_gobject/constants.py
@@ -44,6 +44,8 @@ TYPE_PARAM = _gobject.type_from_name('GParam')
TYPE_OBJECT = _gobject.type_from_name('GObject')
TYPE_PYOBJECT = _gobject.type_from_name('PyObject')
TYPE_GTYPE = _gobject.type_from_name('GType')
+TYPE_STRV = _gobject.type_from_name('GStrv')
+TYPE_VARIANT = _gobject.type_from_name('GVariant')
TYPE_UNICHAR = TYPE_UINT
# do a little dance to maintain API compatibility
diff --git a/gi/_gobject/propertyhelper.py b/gi/_gobject/propertyhelper.py
index dff1d79..673b364 100644
--- a/gi/_gobject/propertyhelper.py
+++ b/gi/_gobject/propertyhelper.py
@@ -29,7 +29,7 @@ from .constants import \
TYPE_ULONG, TYPE_INT64, TYPE_UINT64, TYPE_ENUM, TYPE_FLAGS, \
TYPE_FLOAT, TYPE_DOUBLE, TYPE_STRING, \
TYPE_POINTER, TYPE_BOXED, TYPE_PARAM, TYPE_OBJECT, \
- TYPE_PYOBJECT, TYPE_GTYPE
+ TYPE_PYOBJECT, TYPE_GTYPE, TYPE_STRV
from .constants import \
G_MAXFLOAT, G_MAXDOUBLE, \
G_MININT, G_MAXINT, G_MAXUINT, G_MINLONG, G_MAXLONG, \
@@ -226,7 +226,7 @@ class Property(object):
TYPE_ULONG, TYPE_INT64, TYPE_UINT64,
TYPE_FLOAT, TYPE_DOUBLE, TYPE_POINTER,
TYPE_BOXED, TYPE_PARAM, TYPE_OBJECT, TYPE_STRING,
- TYPE_PYOBJECT, TYPE_GTYPE]:
+ TYPE_PYOBJECT, TYPE_GTYPE, TYPE_STRV]:
return type_
else:
raise TypeError("Unsupported type: %r" % (type_,))
@@ -268,6 +268,12 @@ class Property(object):
if not _gobject.type_is_a(default, ptype):
raise TypeError("flags value %s must be an instance of %r" %
(default, ptype))
+ elif _gobject.type_is_a(ptype, TYPE_STRV) and default is not None:
+ if not isinstance(default, list):
+ raise TypeError("Strv value %s must be a list" % repr(default))
+ for val in default:
+ if type(val) not in (str, bytes):
+ raise TypeError("Strv value %s must contain only strings" % str(default))
def _get_minimum(self):
ptype = self.type
diff --git a/gi/_gobject/pygboxed.c b/gi/_gobject/pygboxed.c
index a00386b..541e77b 100644
--- a/gi/_gobject/pygboxed.c
+++ b/gi/_gobject/pygboxed.c
@@ -50,7 +50,8 @@ pyg_boxed_dealloc(PyGBoxed *self)
static PyObject*
pyg_boxed_richcompare(PyObject *self, PyObject *other, int op)
{
- if (Py_TYPE(self) == Py_TYPE(other) && Py_TYPE(self) == &PyGBoxed_Type)
+ if (Py_TYPE(self) == Py_TYPE(other) &&
+ PyObject_IsInstance(self, (PyObject*)&PyGBoxed_Type))
return _pyglib_generic_ptr_richcompare(((PyGBoxed*)self)->boxed,
((PyGBoxed*)other)->boxed,
op);
diff --git a/gi/_gobject/pygobject.c b/gi/_gobject/pygobject.c
index 9d20b97..75c8ba3 100644
--- a/gi/_gobject/pygobject.c
+++ b/gi/_gobject/pygobject.c
@@ -38,8 +38,8 @@ static int pygobject_clear(PyGObject *self);
static PyObject * pyg_type_get_bases(GType gtype);
static inline int pygobject_clear(PyGObject *self);
static PyObject * pygobject_weak_ref_new(GObject *obj, PyObject *callback, PyObject *user_data);
+static PyObject * pygbinding_weak_ref_new(GObject *obj);
static inline PyGObjectData * pyg_object_peek_inst_data(GObject *obj);
-static PyObject * pygobject_weak_ref_new(GObject *obj, PyObject *callback, PyObject *user_data);
static void pygobject_inherit_slots(PyTypeObject *type, PyObject *bases,
gboolean check_for_present);
static void pygobject_find_slot_for(PyTypeObject *type, PyObject *bases, int slot_offset,
@@ -1485,6 +1485,164 @@ pygobject_set_properties(PyGObject *self, PyObject *args, PyObject *kwargs)
return result;
}
+/* custom closure for gobject bindings */
+static void
+pygbinding_closure_invalidate(gpointer data, GClosure *closure)
+{
+ PyGClosure *pc = (PyGClosure *)closure;
+ PyGILState_STATE state;
+
+ state = pyglib_gil_state_ensure();
+ Py_XDECREF(pc->callback);
+ Py_XDECREF(pc->extra_args);
+ pyglib_gil_state_release(state);
+
+ pc->callback = NULL;
+ pc->extra_args = NULL;
+}
+
+static void
+pygbinding_marshal (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data)
+{
+ PyGILState_STATE state;
+ PyGClosure *pc = (PyGClosure *)closure;
+ PyObject *params, *ret;
+ GValue *out_value;
+
+ state = pyglib_gil_state_ensure();
+
+ /* construct Python tuple for the parameter values */
+ params = PyTuple_New(2);
+ PyTuple_SetItem (params, 0, pyg_value_as_pyobject(&param_values[0], FALSE));
+ PyTuple_SetItem (params, 1, pyg_value_as_pyobject(&param_values[1], FALSE));
+
+ /* params passed to function may have extra arguments */
+ if (pc->extra_args) {
+ PyObject *tuple = params;
+ params = PySequence_Concat(tuple, pc->extra_args);
+ Py_DECREF(tuple);
+ }
+ ret = PyObject_CallObject(pc->callback, params);
+ if (!ret) {
+ PyErr_Print ();
+ goto out;
+ } else if (ret == Py_None) {
+ g_value_set_boolean (return_value, FALSE);
+ goto out;
+ }
+
+ out_value = g_value_get_boxed (&param_values[2]);
+ if (pyg_value_from_pyobject (out_value, ret) != 0) {
+ PyErr_SetString (PyExc_ValueError, "can't convert value");
+ PyErr_Print ();
+ g_value_set_boolean (return_value, FALSE);
+ } else {
+ g_value_set_boolean (return_value, TRUE);
+ }
+
+ Py_DECREF(ret);
+
+out:
+ Py_DECREF(params);
+ pyglib_gil_state_release(state);
+}
+
+static GClosure *
+pygbinding_closure_new (PyObject *callback, PyObject *extra_args)
+{
+ GClosure *closure;
+
+ g_return_val_if_fail(callback != NULL, NULL);
+ closure = g_closure_new_simple(sizeof(PyGClosure), NULL);
+ g_closure_add_invalidate_notifier(closure, NULL, pygbinding_closure_invalidate);
+ g_closure_set_marshal(closure, pygbinding_marshal);
+ Py_INCREF(callback);
+ ((PyGClosure *)closure)->callback = callback;
+ if (extra_args && extra_args != Py_None) {
+ Py_INCREF(extra_args);
+ if (!PyTuple_Check(extra_args)) {
+ PyObject *tmp = PyTuple_New(1);
+ PyTuple_SetItem(tmp, 0, extra_args);
+ extra_args = tmp;
+ }
+ ((PyGClosure *)closure)->extra_args = extra_args;
+ }
+ return closure;
+}
+
+static PyObject *
+pygobject_bind_property(PyGObject *self, PyObject *args)
+{
+ gchar *source_name, *target_name;
+ gchar *source_canon, *target_canon;
+ PyObject *target, *source_repr, *target_repr;
+ PyObject *transform_to, *transform_from, *user_data = NULL;
+ GBinding *binding;
+ GBindingFlags flags = G_BINDING_DEFAULT;
+ GClosure *to_closure = NULL, *from_closure = NULL;
+
+ transform_from = NULL;
+ transform_to = NULL;
+
+ if (!PyArg_ParseTuple(args, "sOs|iOOO:GObject.bind_property",
+ &source_name, &target, &target_name, &flags,
+ &transform_to, &transform_from, &user_data))
+ return NULL;
+
+ CHECK_GOBJECT(self);
+ if (!PyObject_TypeCheck(target, &PyGObject_Type)) {
+ PyErr_SetString(PyExc_TypeError, "Second argument must be a GObject");
+ return NULL;
+ }
+
+ if (transform_to && transform_to != Py_None) {
+ if (!PyCallable_Check (transform_to)) {
+ PyErr_SetString (PyExc_TypeError,
+ "transform_to must be callable or None");
+ return NULL;
+ }
+ to_closure = pygbinding_closure_new (transform_to, user_data);
+ }
+
+ if (transform_from && transform_from != Py_None) {
+ if (!PyCallable_Check (transform_from)) {
+ PyErr_SetString (PyExc_TypeError,
+ "transform_from must be callable or None");
+ return NULL;
+ }
+ from_closure = pygbinding_closure_new (transform_from, user_data);
+ }
+
+ /* Canonicalize underscores to hyphens. Note the results must be freed. */
+ source_canon = g_strdelimit(g_strdup(source_name), "_", '-');
+ target_canon = g_strdelimit(g_strdup(target_name), "_", '-');
+
+ binding = g_object_bind_property_with_closures (G_OBJECT(self->obj), source_canon,
+ pygobject_get(target), target_canon,
+ flags, to_closure, from_closure);
+ g_free(source_canon);
+ g_free(target_canon);
+ source_canon = target_canon = NULL;
+
+ if (binding == NULL) {
+ source_repr = PyObject_Repr((PyObject*)self);
+ target_repr = PyObject_Repr(target);
+ PyErr_Format(PyExc_TypeError, "Cannot create binding from %s.%s to %s.%s",
+ PYGLIB_PyUnicode_AsString(source_repr), source_name,
+ PYGLIB_PyUnicode_AsString(target_repr), target_name);
+ Py_DECREF(source_repr);
+ Py_DECREF(target_repr);
+ return NULL;
+ }
+
+ return pygbinding_weak_ref_new(G_OBJECT (binding));
+}
+
static PyObject *
pygobject_freeze_notify(PyGObject *self, PyObject *args)
{
@@ -2118,11 +2276,13 @@ pygobject_handler_unblock_by_func(PyGObject *self, PyObject *args)
return PYGLIB_PyLong_FromLong(retval);
}
+
static PyMethodDef pygobject_methods[] = {
{ "get_property", (PyCFunction)pygobject_get_property, METH_VARARGS },
{ "get_properties", (PyCFunction)pygobject_get_properties, METH_VARARGS },
{ "set_property", (PyCFunction)pygobject_set_property, METH_VARARGS },
{ "set_properties", (PyCFunction)pygobject_set_properties, METH_VARARGS|METH_KEYWORDS },
+ { "bind_property", (PyCFunction)pygobject_bind_property, METH_VARARGS|METH_KEYWORDS },
{ "freeze_notify", (PyCFunction)pygobject_freeze_notify, METH_VARARGS },
{ "notify", (PyCFunction)pygobject_notify, METH_VARARGS },
{ "thaw_notify", (PyCFunction)pygobject_thaw_notify, METH_VARARGS },
@@ -2325,6 +2485,54 @@ pygobject_weak_ref_call(PyGObjectWeakRef *self, PyObject *args, PyObject *kw)
}
}
+
+/* -------------- GBinding Weak Reference ----------------- */
+
+/**
+ * BindingWeakRef
+ *
+ * The BindingWeakRef object is used to manage GBinding objects within python
+ * created through GObject.bind_property. It is a sub-class PyGObjectWeakRef so
+ * that we can maintain the same reference counting semantics between Python
+ * and GObject Binding objects. This gives explicit direct control of the
+ * binding lifetime by using the "unbind" method on the BindingWeakRef object
+ * along with implicit management based on the lifetime of the source or
+ * target objects.
+ */
+
+PYGLIB_DEFINE_TYPE("gi._gobject.GBindingWeakRef", PyGBindingWeakRef_Type, PyGObjectWeakRef);
+
+static PyObject *
+pygbinding_weak_ref_new(GObject *obj)
+{
+ PyGObjectWeakRef *self;
+
+ self = PyObject_GC_New(PyGObjectWeakRef, &PyGBindingWeakRef_Type);
+ self->callback = NULL;
+ self->user_data = NULL;
+ self->obj = obj;
+ g_object_weak_ref(self->obj, (GWeakNotify) pygobject_weak_ref_notify, self);
+ return (PyObject *) self;
+}
+
+static PyObject *
+pygbinding_weak_ref_unbind(PyGObjectWeakRef *self, PyObject *args)
+{
+ if (!self->obj) {
+ PyErr_SetString(PyExc_ValueError, "weak binding ref already unreffed");
+ return NULL;
+ }
+ g_object_unref(self->obj);
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static PyMethodDef pygbinding_weak_ref_methods[] = {
+ { "unbind", (PyCFunction)pygbinding_weak_ref_unbind, METH_NOARGS},
+ { NULL, NULL, 0}
+};
+
+
static gpointer
pyobject_copy(gpointer boxed)
{
@@ -2427,6 +2635,14 @@ pygobject_object_register_types(PyObject *d)
return;
PyDict_SetItemString(d, "GObjectWeakRef", (PyObject *) &PyGObjectWeakRef_Type);
+ PyGBindingWeakRef_Type.tp_flags = Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_GC;
+ PyGBindingWeakRef_Type.tp_doc = "A GBinding weak reference";
+ PyGBindingWeakRef_Type.tp_methods = pygbinding_weak_ref_methods;
+ PyGBindingWeakRef_Type.tp_base = &PyGObjectWeakRef_Type;
+ if (PyType_Ready(&PyGBindingWeakRef_Type) < 0)
+ return;
+ PyDict_SetItemString(d, "GBindingWeakRef", (PyObject *) &PyGBindingWeakRef_Type);
+
PyGContextFreezeNotify_Type.tp_dealloc = (destructor)pygcontext_freeze_notify_dealloc;
PyGContextFreezeNotify_Type.tp_flags = Py_TPFLAGS_DEFAULT;
PyGContextFreezeNotify_Type.tp_doc = "Context manager for freeze/thaw of GObjects";
diff --git a/gi/_gobject/pygtype.c b/gi/_gobject/pygtype.c
index fa95d13..fe2c3b6 100644
--- a/gi/_gobject/pygtype.c
+++ b/gi/_gobject/pygtype.c
@@ -727,6 +727,26 @@ pyg_value_array_from_pyobject(GValue *value,
return 0;
}
+static
+PyObject *
+pyg_get_gvariant_type()
+{
+ static PyObject *variant_type = NULL;
+ PyObject *py_module;
+
+ if (variant_type == NULL) {
+ py_module = PyImport_ImportModule ("gi.repository.GLib");
+ if (py_module == NULL)
+ return NULL;
+
+ variant_type = PyObject_GetAttrString (py_module, "Variant");
+
+ Py_DECREF (py_module);
+ }
+
+ return variant_type;
+}
+
/**
* pyg_value_from_pyobject:
* @value: the GValue object to store the converted value in.
@@ -991,6 +1011,17 @@ pyg_value_from_pyobject(GValue *value, PyObject *obj)
} else
return -1;
break;
+ case G_TYPE_VARIANT:
+ {
+ PyObject* variant_type = pyg_get_gvariant_type();
+ if (obj == Py_None)
+ g_value_set_variant(value, NULL);
+ else if (variant_type != NULL && PyObject_IsInstance(obj, variant_type))
+ g_value_set_variant(value, pyg_boxed_get(obj, GVariant));
+ else
+ return -1;
+ break;
+ }
default:
{
PyGTypeMarshal *bm;
@@ -1147,6 +1178,15 @@ pyg_value_as_pyobject(const GValue *value, gboolean copy_boxed)
return pyg_param_spec_new(g_value_get_param(value));
case G_TYPE_OBJECT:
return pygobject_new(g_value_get_object(value));
+ case G_TYPE_VARIANT:
+ {
+ GVariant *v = g_value_get_variant(value);
+ if (v == NULL) {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+ return pyg_boxed_new(G_TYPE_VARIANT, g_variant_ref(v), FALSE, FALSE);
+ }
default:
{
PyGTypeMarshal *bm;
@@ -1229,8 +1269,11 @@ pyg_closure_marshal(GClosure *closure,
}
if (return_value && pyg_value_from_pyobject(return_value, ret) != 0) {
- PyErr_SetString(PyExc_TypeError,
- "can't convert return value to desired type");
+ /* If we already have an exception set, use that, otherwise set a
+ * generic one */
+ if (!PyErr_Occurred())
+ PyErr_SetString(PyExc_TypeError,
+ "can't convert return value to desired type");
if (pc->exception_handler)
pc->exception_handler(return_value, n_param_values, param_values);
diff --git a/gi/overrides/GLib.py b/gi/overrides/GLib.py
index 41904c8..dcb2728 100644
--- a/gi/overrides/GLib.py
+++ b/gi/overrides/GLib.py
@@ -171,6 +171,9 @@ class Variant(GLib.Variant):
raise TypeError('invalid remaining format string: "%s"' % rest_format)
return v
+ def __del__(self):
+ self.unref()
+
def __repr__(self):
return '<GLib.Variant(%s)>' % getattr(self, 'print')(True)
diff --git a/gi/overrides/Gdk.py b/gi/overrides/Gdk.py
index 604ac37..66d47ef 100644
--- a/gi/overrides/Gdk.py
+++ b/gi/overrides/Gdk.py
@@ -30,6 +30,7 @@ __all__ = []
class Color(Gdk.Color):
+ MAX_VALUE = 65535
def __init__(self, red, green, blue):
Gdk.Color.__init__(self)
@@ -46,6 +47,28 @@ class Color(Gdk.Color):
def __repr__(self):
return '<Gdk.Color(red=%d, green=%d, blue=%d)>' % (self.red, self.green, self.blue)
+ red_float = property(fget=lambda self: self.red / float(self.MAX_VALUE),
+ fset=lambda self, v: setattr(self, 'red', int(v * self.MAX_VALUE)))
+
+ green_float = property(fget=lambda self: self.green / float(self.MAX_VALUE),
+ fset=lambda self, v: setattr(self, 'green', int(v * self.MAX_VALUE)))
+
+ blue_float = property(fget=lambda self: self.blue / float(self.MAX_VALUE),
+ fset=lambda self, v: setattr(self, 'blue', int(v * self.MAX_VALUE)))
+
+ def to_floats(self):
+ """Return (red_float, green_float, blue_float) triple."""
+
+ return (self.red_float, self.green_float, self.blue_float)
+
+ @staticmethod
+ def from_floats(red, green, blue):
+ """Return a new Color object from red/green/blue values from 0.0 to 1.0."""
+
+ return Color(int(red * Color.MAX_VALUE),
+ int(green * Color.MAX_VALUE),
+ int(blue * Color.MAX_VALUE))
+
Color = override(Color)
__all__.append('Color')
@@ -67,6 +90,27 @@ if Gdk._version == '3.0':
def __repr__(self):
return '<Gdk.Color(red=%f, green=%f, blue=%f, alpha=%f)>' % (self.red, self.green, self.blue, self.alpha)
+ def __iter__(self):
+ """Iterator which allows easy conversion to tuple and list types."""
+
+ yield self.red
+ yield self.green
+ yield self.blue
+ yield self.alpha
+
+ def to_color(self):
+ """Converts this RGBA into a Color instance which excludes alpha."""
+
+ return Color(int(self.red * Color.MAX_VALUE),
+ int(self.green * Color.MAX_VALUE),
+ int(self.blue * Color.MAX_VALUE))
+
+ @classmethod
+ def from_color(cls, color):
+ """Returns a new RGBA instance given a Color instance."""
+
+ return cls(color.red_float, color.green_float, color.blue_float)
+
RGBA = override(RGBA)
__all__.append('RGBA')
diff --git a/gi/overrides/Gtk.py b/gi/overrides/Gtk.py
index 5ae61b2..1043cbf 100644
--- a/gi/overrides/Gtk.py
+++ b/gi/overrides/Gtk.py
@@ -750,9 +750,9 @@ class TreeModel(Gtk.TreeModel):
# alias for Python 2.x object protocol
__nonzero__ = __bool__
- def __getitem__(self, key):
+ def _getiter(self, key):
if isinstance(key, Gtk.TreeIter):
- return TreeModelRow(self, key)
+ return key
elif isinstance(key, int) and key < 0:
index = len(self) + key
if index < 0:
@@ -761,18 +761,26 @@ class TreeModel(Gtk.TreeModel):
aiter = self.get_iter(index)
except ValueError:
raise IndexError("could not find tree path '%s'" % key)
- return TreeModelRow(self, aiter)
+ return aiter
else:
try:
aiter = self.get_iter(key)
except ValueError:
raise IndexError("could not find tree path '%s'" % key)
- return TreeModelRow(self, aiter)
+ return aiter
+
+ def __getitem__(self, key):
+ aiter = self._getiter(key)
+ return TreeModelRow(self, aiter)
def __setitem__(self, key, value):
row = self[key]
self.set_row(row.iter, value)
+ def __delitem__(self, key):
+ aiter = self._getiter(key)
+ self.remove(aiter)
+
def __iter__(self):
return TreeModelRowIter(self, self.get_iter_first())
@@ -1080,6 +1088,10 @@ class TreeModelRow(object):
return self.get_next()
@property
+ def previous(self):
+ return self.get_previous()
+
+ @property
def parent(self):
return self.get_parent()
@@ -1088,6 +1100,11 @@ class TreeModelRow(object):
if next_iter:
return TreeModelRow(self.model, next_iter)
+ def get_previous(self):
+ prev_iter = self.model.iter_previous(self.iter)
+ if prev_iter:
+ return TreeModelRow(self.model, prev_iter)
+
def get_parent(self):
parent_iter = self.model.iter_parent(self.iter)
if parent_iter:
diff --git a/gi/overrides/Makefile.in b/gi/overrides/Makefile.in
index d5409a3..85abd08 100644
--- a/gi/overrides/Makefile.in
+++ b/gi/overrides/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# Makefile.in generated by automake 1.11.5 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -15,6 +15,23 @@
@SET_MAKE@
VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -56,6 +73,11 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
SOURCES =
DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -97,6 +119,8 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_LIBS = @CAIRO_LIBS@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@@ -296,8 +320,11 @@ clean-libtool:
-rm -rf .libs _libs
install-pygioverridesPYTHON: $(pygioverrides_PYTHON)
@$(NORMAL_INSTALL)
- test -z "$(pygioverridesdir)" || $(MKDIR_P) "$(DESTDIR)$(pygioverridesdir)"
@list='$(pygioverrides_PYTHON)'; dlist=; list2=; test -n "$(pygioverridesdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(pygioverridesdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(pygioverridesdir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
if test -f $$b$$p; then \
diff --git a/gi/pygi-argument.c b/gi/pygi-argument.c
index 64602f2..fb798e1 100644
--- a/gi/pygi-argument.c
+++ b/gi/pygi-argument.c
@@ -730,6 +730,7 @@ _pygi_argument_from_object (PyObject *object,
int_ = PYGLIB_PyNumber_Long (object);
if (int_ == NULL) {
+ PyErr_SetString (PyExc_TypeError, "expected int argument");
break;
}
@@ -754,6 +755,7 @@ _pygi_argument_from_object (PyObject *object,
number = PYGLIB_PyNumber_Long (object);
if (number == NULL) {
+ PyErr_SetString (PyExc_TypeError, "expected int argument");
break;
}
@@ -784,6 +786,7 @@ _pygi_argument_from_object (PyObject *object,
number = PYGLIB_PyNumber_Long (object);
if (number == NULL) {
+ PyErr_SetString (PyExc_TypeError, "expected int argument");
break;
}
@@ -806,6 +809,7 @@ _pygi_argument_from_object (PyObject *object,
float_ = PyNumber_Float (object);
if (float_ == NULL) {
+ PyErr_SetString (PyExc_TypeError, "expected float or int argument");
break;
}
@@ -820,6 +824,7 @@ _pygi_argument_from_object (PyObject *object,
float_ = PyNumber_Float (object);
if (float_ == NULL) {
+ PyErr_SetString (PyExc_TypeError, "expected float or int argument");
break;
}
@@ -951,6 +956,16 @@ _pygi_argument_from_object (PyObject *object,
break;
}
+ /* Note, strings are sequences, but we cannot accept them here */
+ if (!PySequence_Check (object) ||
+#if PY_VERSION_HEX < 0x03000000
+ PyString_Check (object) ||
+#endif
+ PyUnicode_Check (object)) {
+ PyErr_SetString (PyExc_TypeError, "expected sequence");
+ break;
+ }
+
length = PySequence_Length (object);
if (length < 0) {
break;
@@ -1097,9 +1112,13 @@ array_success:
result = pygi_struct_foreign_convert_to_g_argument (
object, info, transfer, &arg);
} else if (g_type_is_a (type, G_TYPE_BOXED)) {
- arg.v_pointer = pyg_boxed_get (object, void);
- if (transfer == GI_TRANSFER_EVERYTHING) {
- arg.v_pointer = g_boxed_copy (type, arg.v_pointer);
+ if (pyg_boxed_check (object, type)) {
+ arg.v_pointer = pyg_boxed_get (object, void);
+ if (transfer == GI_TRANSFER_EVERYTHING) {
+ arg.v_pointer = g_boxed_copy (type, arg.v_pointer);
+ }
+ } else {
+ PyErr_Format (PyExc_TypeError, "wrong boxed type");
}
} else if (g_type_is_a (type, G_TYPE_POINTER) ||
g_type_is_a (type, G_TYPE_VARIANT) ||
diff --git a/gi/pygi-cache.c b/gi/pygi-cache.c
index 610e35b..5083417 100644
--- a/gi/pygi-cache.c
+++ b/gi/pygi-cache.c
@@ -155,16 +155,11 @@ _sequence_cache_new (GITypeInfo *type_info,
sc = g_slice_new0 (PyGISequenceCache);
( (PyGIArgCache *)sc)->destroy_notify = (GDestroyNotify)_sequence_cache_free_func;
- sc->fixed_size = -1;
- sc->len_arg_index = -1;
sc->is_zero_terminated = g_type_info_is_zero_terminated (type_info);
- if (!sc->is_zero_terminated) {
- sc->fixed_size = g_type_info_get_array_fixed_size (type_info);
- if (sc->fixed_size < 0)
- sc->len_arg_index = g_type_info_get_array_length (type_info);
- if (sc->len_arg_index >= 0)
- sc->len_arg_index += child_offset;
- }
+ sc->fixed_size = g_type_info_get_array_fixed_size (type_info);
+ sc->len_arg_index = g_type_info_get_array_length (type_info);
+ if (sc->len_arg_index >= 0)
+ sc->len_arg_index += child_offset;
item_type_info = g_type_info_get_param_type (type_info, 0);
diff --git a/gi/pygi-closure.c b/gi/pygi-closure.c
index c89be64..241d91a 100644
--- a/gi/pygi-closure.c
+++ b/gi/pygi-closure.c
@@ -72,6 +72,23 @@ _pygi_closure_assign_pyobj_to_out_argument (gpointer out_arg, PyObject *object,
case GI_TYPE_TAG_DOUBLE:
*((gdouble *) out_arg) = arg.v_double;
break;
+ case GI_TYPE_TAG_INTERFACE:
+ {
+ GIBaseInfo *interface;
+ GIInfoType interface_type;
+
+ interface = g_type_info_get_interface (type_info);
+ interface_type = g_base_info_get_type (interface);
+
+ if (!g_type_info_is_pointer (type_info) &&
+ interface_type == GI_INFO_TYPE_STRUCT) {
+ gsize item_size = _pygi_g_type_info_size (type_info);
+ memcpy (out_arg, arg.v_pointer, item_size);
+ break;
+ }
+ }
+
+ /* Fall through */
default:
*((GIArgument *) out_arg) = arg;
break;
diff --git a/gi/pygi-foreign-cairo.c b/gi/pygi-foreign-cairo.c
index 4e12df3..ef3b0ab 100644
--- a/gi/pygi-foreign-cairo.c
+++ b/gi/pygi-foreign-cairo.c
@@ -112,6 +112,79 @@ cairo_surface_release (GIBaseInfo *base_info,
Py_RETURN_NONE;
}
+
+PyObject *
+cairo_path_to_arg (PyObject *value,
+ GIInterfaceInfo *interface_info,
+ GITransfer transfer,
+ GIArgument *arg)
+{
+ cairo_path_t *path;
+
+ g_assert (transfer == GI_TRANSFER_NOTHING);
+
+ path = ( (PycairoPath*) value)->path;
+ if (!path) {
+ PyErr_SetString (PyExc_ValueError, "Path instance wrapping a NULL path");
+ return NULL;
+ }
+
+ arg->v_pointer = path;
+ Py_RETURN_NONE;
+}
+
+PyObject *
+cairo_path_from_arg (GIInterfaceInfo *interface_info, gpointer data)
+{
+ cairo_path_t *path = (cairo_path_t*) data;
+
+ return PycairoPath_FromPath (path);
+}
+
+PyObject *
+cairo_path_release (GIBaseInfo *base_info,
+ gpointer struct_)
+{
+ cairo_path_destroy ( (cairo_path_t*) struct_);
+ Py_RETURN_NONE;
+}
+
+PyObject *
+cairo_font_options_to_arg (PyObject *value,
+ GIInterfaceInfo *interface_info,
+ GITransfer transfer,
+ GIArgument *arg)
+{
+ cairo_font_options_t *font_options;
+
+ g_assert (transfer == GI_TRANSFER_NOTHING);
+
+ font_options = ( (PycairoFontOptions*) value)->font_options;
+ if (!font_options) {
+ PyErr_SetString (PyExc_ValueError, "FontOptions instance wrapping a NULL font_options");
+ return NULL;
+ }
+
+ arg->v_pointer = font_options;
+ Py_RETURN_NONE;
+}
+
+PyObject *
+cairo_font_options_from_arg (GIInterfaceInfo *interface_info, gpointer data)
+{
+ cairo_font_options_t *font_options = (cairo_font_options_t*) data;
+
+ return PycairoFontOptions_FromFontOptions (cairo_font_options_copy (font_options));
+}
+
+PyObject *
+cairo_font_options_release (GIBaseInfo *base_info,
+ gpointer struct_)
+{
+ cairo_font_options_destroy ( (cairo_font_options_t*) struct_);
+ Py_RETURN_NONE;
+}
+
static PyMethodDef _gi_cairo_functions[] = { {0,} };
PYGLIB_MODULE_START(_gi_cairo, "_gi_cairo")
{
@@ -135,5 +208,17 @@ PYGLIB_MODULE_START(_gi_cairo, "_gi_cairo")
cairo_surface_to_arg,
cairo_surface_from_arg,
cairo_surface_release);
+
+ pygi_register_foreign_struct ("cairo",
+ "Path",
+ cairo_path_to_arg,
+ cairo_path_from_arg,
+ cairo_path_release);
+
+ pygi_register_foreign_struct ("cairo",
+ "FontOptions",
+ cairo_font_options_to_arg,
+ cairo_font_options_from_arg,
+ cairo_font_options_release);
}
PYGLIB_MODULE_END;
diff --git a/gi/pygi-property.c b/gi/pygi-property.c
index f400820..56a9745 100644
--- a/gi/pygi-property.c
+++ b/gi/pygi-property.c
@@ -213,6 +213,25 @@ pygi_get_property_value_real (PyGObject *instance,
case GI_TYPE_TAG_GLIST:
arg.v_pointer = g_value_get_pointer (&value);
break;
+ case GI_TYPE_TAG_ARRAY:
+ {
+ gchar** strings;
+ GArray *arg_items;
+ int i;
+
+ strings = g_value_get_boxed (&value);
+ if (strings == NULL)
+ arg.v_pointer = NULL;
+ else {
+ arg_items = g_array_sized_new (TRUE, TRUE, sizeof (GIArgument), g_strv_length (strings));
+ g_array_set_size (arg_items, g_strv_length (strings));
+ for (i = 0; strings[i] != NULL; ++i) {
+ g_array_index (arg_items, GIArgument, i).v_string = strings[i];
+ }
+ arg.v_pointer = arg_items;
+ }
+ break;
+ }
default:
PyErr_Format (PyExc_NotImplementedError,
"Retrieving properties of type %s is not implemented",
@@ -268,6 +287,9 @@ pygi_set_property_value_real (PyGObject *instance,
transfer = g_property_info_get_ownership_transfer (property_info);
arg = _pygi_argument_from_object (py_value, type_info, transfer);
+ if (PyErr_Occurred())
+ goto out;
+
g_value_init (&value, G_PARAM_SPEC_VALUE_TYPE (pspec));
// FIXME: Lots of types still unhandled
@@ -366,6 +388,23 @@ pygi_set_property_value_real (PyGObject *instance,
case GI_TYPE_TAG_GLIST:
g_value_set_pointer (&value, arg.v_pointer);
break;
+ case GI_TYPE_TAG_ARRAY:
+ {
+ GArray *arg_items = (GArray*) arg.v_pointer;
+ gchar** strings;
+ int i;
+
+ if (arg_items == NULL)
+ goto out;
+
+ strings = g_new0 (char*, arg_items->len);
+ for (i = 0; i < arg_items->len; ++i) {
+ strings[i] = g_array_index (arg_items, GIArgument, i).v_string;
+ }
+ g_array_free (arg_items, TRUE);
+ g_value_set_boxed (&value, strings);
+ break;
+ }
default:
PyErr_Format (PyExc_NotImplementedError,
"Setting properties of type %s is not implemented",
diff --git a/gi/pygtkcompat.py b/gi/pygtkcompat.py
index 4eeaf04..9359219 100644
--- a/gi/pygtkcompat.py
+++ b/gi/pygtkcompat.py
@@ -71,9 +71,8 @@ def _install_enums(module, dest=None, strip=''):
try:
if issubclass(obj, GObject.GFlags):
for value, flag in obj.__flags_values__.items():
- for name in flag.value_names:
- name = name.replace(modname + '_', '')
- setattr(dest, name, flag)
+ name = flag.value_names[-1].replace(modname + '_', '')
+ setattr(dest, name, flag)
except TypeError:
continue
@@ -135,6 +134,26 @@ def enable_gtk(version='2.0'):
Gdk.pixbuf_new_from_file = GdkPixbuf.Pixbuf.new_from_file
Gdk.PixbufLoader = GdkPixbuf.PixbufLoader.new_with_type
+ orig_get_formats = GdkPixbuf.Pixbuf.get_formats
+
+ def get_formats():
+ formats = orig_get_formats()
+ result = []
+
+ def make_dict(format_):
+ result = {}
+ result['description'] = format_.get_description()
+ result['name'] = format_.get_name()
+ result['mime_types'] = format_.get_mime_types()
+ result['extensions'] = format_.get_extensions()
+ return result
+
+ for format_ in formats:
+ result.append(make_dict(format_))
+ return result
+
+ Gdk.pixbuf_get_formats = get_formats
+
orig_get_frame_extents = Gdk.Window.get_frame_extents
def get_frame_extents(window):
@@ -155,6 +174,9 @@ def enable_gtk(version='2.0'):
return orig_get_origin(self)[1:]
Gdk.Window.get_origin = get_origin
+ Gdk.screen_width = Gdk.Screen.width
+ Gdk.screen_height = Gdk.Screen.height
+
# gtk
gi.require_version('Gtk', version)
from gi.repository import Gtk
@@ -309,8 +331,19 @@ def enable_gtk(version='2.0'):
Gtk.icon_theme_get_default = Gtk.IconTheme.get_default
Gtk.image_new_from_pixbuf = Gtk.Image.new_from_pixbuf
Gtk.image_new_from_stock = Gtk.Image.new_from_stock
+ Gtk.image_new_from_animation = Gtk.Image.new_from_animation
+ Gtk.image_new_from_icon_set = Gtk.Image.new_from_icon_set
+ Gtk.image_new_from_file = Gtk.Image.new_from_file
Gtk.settings_get_default = Gtk.Settings.get_default
Gtk.window_set_default_icon = Gtk.Window.set_default_icon
+ Gtk.clipboard_get = Gtk.Clipboard.get
+
+ #AccelGroup
+ Gtk.AccelGroup.connect_group = Gtk.AccelGroup.connect
+
+ #StatusIcon
+ Gtk.status_icon_position_menu = Gtk.StatusIcon.position_menu
+ Gtk.StatusIcon.set_tooltip = Gtk.StatusIcon.set_tooltip_text
# Scale
@@ -351,9 +384,9 @@ def enable_gtk(version='2.0'):
def __getitem__(self, state):
color = self.context.get_background_color(state)
- return Gdk.Color(red=color.red,
- green=color.green,
- blue=color.blue)
+ return Gdk.Color(red=int(color.red * 65535),
+ green=int(color.green * 65535),
+ blue=int(color.blue * 65535))
class Styles(object):
def __init__(self, widget):
diff --git a/gi/repository/Makefile.in b/gi/repository/Makefile.in
index c52283c..4f03e5a 100644
--- a/gi/repository/Makefile.in
+++ b/gi/repository/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# Makefile.in generated by automake 1.11.5 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -15,6 +15,23 @@
@SET_MAKE@
VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -56,6 +73,11 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
SOURCES =
DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -97,6 +119,8 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_LIBS = @CAIRO_LIBS@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@@ -289,8 +313,11 @@ clean-libtool:
-rm -rf .libs _libs
install-pygirepositoryPYTHON: $(pygirepository_PYTHON)
@$(NORMAL_INSTALL)
- test -z "$(pygirepositorydir)" || $(MKDIR_P) "$(DESTDIR)$(pygirepositorydir)"
@list='$(pygirepository_PYTHON)'; dlist=; list2=; test -n "$(pygirepositorydir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(pygirepositorydir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(pygirepositorydir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
if test -f $$b$$p; then \
diff --git a/gi/types.py b/gi/types.py
index e44edba..95f1059 100644
--- a/gi/types.py
+++ b/gi/types.py
@@ -121,10 +121,10 @@ class MetaClassHelper(object):
# If a method name starts with "do_" assume it is a vfunc, and search
# in the base classes for a method with the same name to override.
- # Recursion is not necessary here because getattr() searches all
- # super class attributes as well.
+ # Recursion is necessary as overriden methods in most immediate parent
+ # classes may shadow vfuncs from classes higher in the hierarchy.
vfunc_info = None
- for base in cls.__bases__:
+ for base in cls.__mro__:
method = getattr(base, vfunc_name, None)
if method is not None and hasattr(method, '__info__') and \
isinstance(method.__info__, VFuncInfo):
diff --git a/tests/Makefile.am b/tests/Makefile.am
index f54a8bb..7b2390a 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -2,8 +2,8 @@ CLEANFILES =
noinst_LTLIBRARIES = libregress.la libgimarshallingtests.la
nodist_libregress_la_SOURCES = $(GI_DATADIR)/tests/regress.c $(GI_DATADIR)/tests/regress.h
-libregress_la_CFLAGS = $(GIO_CFLAGS) $(PYCAIRO_CFLAGS)
-libregress_la_LDFLAGS = -module -avoid-version $(GIO_LIBS) $(PYCAIRO_LIBS)
+libregress_la_CFLAGS = $(GIO_CFLAGS) $(CAIRO_CFLAGS)
+libregress_la_LDFLAGS = -module -avoid-version $(GIO_LIBS) $(CAIRO_LIBS)
nodist_libgimarshallingtests_la_SOURCES = $(GI_DATADIR)/tests/gimarshallingtests.c $(GI_DATADIR)/tests/gimarshallingtests.h
libgimarshallingtests_la_CFLAGS = $(GLIB_CFLAGS)
libgimarshallingtests_la_LDFLAGS = -module -avoid-version $(GLIB_LIBS)
@@ -101,6 +101,7 @@ RUN_TESTS_ENV_VARS= \
LD_LIBRARY_PATH=$(builddir)/.libs:$$LD_LIBRARY_PATH \
GI_TYPELIB_PATH=$(builddir):$$GI_TYPELIB_PATH \
XDG_DATA_DIRS=$$XDG_DATA_DIRS:/usr/share \
+ MALLOC_PERTURB_=85 \
TESTS_BUILDDIR=$(builddir)
check-local: $(LTLIBRARIES:.la=.so) Regress-1.0.typelib GIMarshallingTests-1.0.typelib gschemas.compiled
@@ -117,6 +118,6 @@ check.nemiver:
EXEC_NAME="nemiver" $(MAKE) check
check.valgrind:
- EXEC_NAME="valgrind --suppressions=python.supp" G_SLICE=always-malloc G_DEBUG=gc-friendly $(MAKE) check
+ EXEC_NAME="valgrind --leak-check=full --show-possibly-lost=no --suppressions=python.supp" G_SLICE=always-malloc G_DEBUG=gc-friendly $(MAKE) check
-include $(top_srcdir)/git.mk
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 4e90e86..44df7db 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# Makefile.in generated by automake 1.11.5 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -16,6 +16,23 @@
@SET_MAKE@
VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -105,6 +122,11 @@ am__v_GEN_0 = @echo " GEN " $@;
SOURCES = $(nodist_libgimarshallingtests_la_SOURCES) \
$(nodist_libregress_la_SOURCES) $(testhelper_la_SOURCES)
DIST_SOURCES = $(testhelper_la_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -118,6 +140,8 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+CAIRO_CFLAGS = @CAIRO_CFLAGS@
+CAIRO_LIBS = @CAIRO_LIBS@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@@ -271,8 +295,8 @@ CLEANFILES = Regress-1.0.gir Regress-1.0.typelib \
noinst_LTLIBRARIES = libregress.la libgimarshallingtests.la \
testhelper.la
nodist_libregress_la_SOURCES = $(GI_DATADIR)/tests/regress.c $(GI_DATADIR)/tests/regress.h
-libregress_la_CFLAGS = $(GIO_CFLAGS) $(PYCAIRO_CFLAGS)
-libregress_la_LDFLAGS = -module -avoid-version $(GIO_LIBS) $(PYCAIRO_LIBS)
+libregress_la_CFLAGS = $(GIO_CFLAGS) $(CAIRO_CFLAGS)
+libregress_la_LDFLAGS = -module -avoid-version $(GIO_LIBS) $(CAIRO_LIBS)
nodist_libgimarshallingtests_la_SOURCES = $(GI_DATADIR)/tests/gimarshallingtests.c $(GI_DATADIR)/tests/gimarshallingtests.h
libgimarshallingtests_la_CFLAGS = $(GLIB_CFLAGS)
libgimarshallingtests_la_LDFLAGS = -module -avoid-version $(GLIB_LIBS)
@@ -318,6 +342,7 @@ RUN_TESTS_ENV_VARS = \
LD_LIBRARY_PATH=$(builddir)/.libs:$$LD_LIBRARY_PATH \
GI_TYPELIB_PATH=$(builddir):$$GI_TYPELIB_PATH \
XDG_DATA_DIRS=$$XDG_DATA_DIRS:/usr/share \
+ MALLOC_PERTURB_=85 \
TESTS_BUILDDIR=$(builddir)
all: all-am
@@ -711,7 +736,7 @@ check.nemiver:
EXEC_NAME="nemiver" $(MAKE) check
check.valgrind:
- EXEC_NAME="valgrind --suppressions=python.supp" G_SLICE=always-malloc G_DEBUG=gc-friendly $(MAKE) check
+ EXEC_NAME="valgrind --leak-check=full --show-possibly-lost=no --suppressions=python.supp" G_SLICE=always-malloc G_DEBUG=gc-friendly $(MAKE) check
-include $(top_srcdir)/git.mk
diff --git a/tests/test_everything.py b/tests/test_everything.py
index 563936b..728d58a 100644
--- a/tests/test_everything.py
+++ b/tests/test_everything.py
@@ -9,11 +9,16 @@ sys.path.insert(0, "../")
from sys import getrefcount
import copy
-import cairo
+try:
+ import cairo
+ has_cairo = True
+except ImportError:
+ has_cairo = False
from gi.repository import GObject
from gi.repository import GLib
from gi.repository import Gio
+from gi.repository import Gtk
from gi.repository import Regress as Everything
if sys.version_info < (3, 0):
@@ -25,6 +30,7 @@ else:
class TestEverything(unittest.TestCase):
+ @unittest.skipUnless(has_cairo, 'built without cairo support')
def test_cairo_context(self):
context = Everything.test_cairo_context_full_return()
self.assertTrue(isinstance(context, cairo.Context))
@@ -33,6 +39,7 @@ class TestEverything(unittest.TestCase):
context = cairo.Context(surface)
Everything.test_cairo_context_none_in(context)
+ @unittest.skipUnless(has_cairo, 'built without cairo support')
def test_cairo_surface(self):
surface = Everything.test_cairo_surface_none_return()
self.assertTrue(isinstance(surface, cairo.ImageSurface))
@@ -184,7 +191,7 @@ class TestEverything(unittest.TestCase):
# https://bugzilla.gnome.org/show_bug.cgi?id=666636
# workaround by explicitly building a GStrv object
class GStrv(list):
- __gtype__ = GObject.type_from_name('GStrv')
+ __gtype__ = GObject.TYPE_STRV
data = {'integer': 12,
'boolean': True,
@@ -470,13 +477,12 @@ class TestClosures(unittest.TestCase):
self.assertTrue(self.called)
self.assertEqual(result, 43)
- # https://bugzilla.gnome.org/show_bug.cgi?id=656554
-
- @unittest.expectedFailure
def test_variant(self):
def callback(variant):
- self.assertEqual(variant.get_type_string(), 'i')
self.called = True
+ if variant is None:
+ return None
+ self.assertEqual(variant.get_type_string(), 'i')
return GLib.Variant('i', variant.get_int32() + 1)
self.called = False
@@ -485,6 +491,15 @@ class TestClosures(unittest.TestCase):
self.assertEqual(result.get_type_string(), 'i')
self.assertEqual(result.get_int32(), 43)
+ self.called = False
+ result = Everything.test_closure_variant(callback, None)
+ self.assertTrue(self.called)
+ self.assertEqual(result, None)
+
+ self.called = False
+ self.assertRaises(TypeError, Everything.test_closure_variant, callback, 'foo')
+ self.assertFalse(self.called)
+
class TestProperties(unittest.TestCase):
@@ -499,12 +514,12 @@ class TestProperties(unittest.TestCase):
self.assertEqual(object_.props.float, 0.0)
object_.props.float = 42.42
self.assertTrue(isinstance(object_.props.float, float))
- self.assertAlmostEquals(object_.props.float, 42.42, places=5)
+ self.assertAlmostEqual(object_.props.float, 42.42, places=5)
self.assertEqual(object_.props.double, 0.0)
object_.props.double = 42.42
self.assertTrue(isinstance(object_.props.double, float))
- self.assertAlmostEquals(object_.props.double, 42.42, places=5)
+ self.assertAlmostEqual(object_.props.double, 42.42, places=5)
self.assertEqual(object_.props.string, None)
object_.props.string = 'mec'
@@ -542,6 +557,14 @@ class TestProperties(unittest.TestCase):
self.assertTrue(isinstance(object_.props.boxed, Everything.TestBoxed))
self.assertEqual(object_.props.boxed.some_int8, 42)
+ def test_boxed_equality(self):
+ boxed = Everything.TestBoxedC()
+ # TestBoxedC uses refcounting, so we know that
+ # the pointer is the same when copied
+ copy = boxed.copy()
+ self.assertEqual(boxed, copy)
+ self.assertNotEqual(id(boxed), id(copy))
+
def test_gtype(self):
object_ = Everything.TestObj()
self.assertEqual(object_.props.gtype, GObject.TYPE_INVALID)
@@ -650,3 +673,10 @@ class TestSignals(unittest.TestCase):
obj.connect('sig-with-obj', callback)
obj.emit_sig_with_obj()
+
+
+class TestPango(unittest.TestCase):
+ def test_cairo_font_options(self):
+ screen = Gtk.Window().get_screen()
+ font_opts = screen.get_font_options()
+ self.assertEqual(type(font_opts.get_subpixel_order()), int)
diff --git a/tests/test_gi.py b/tests/test_gi.py
index 2b5b5a1..50b5a25 100644
--- a/tests/test_gi.py
+++ b/tests/test_gi.py
@@ -562,7 +562,7 @@ class TestFloat(unittest.TestCase):
MIN = GObject.constants.G_MINFLOAT
def test_float_return(self):
- self.assertAlmostEquals(self.MAX, GIMarshallingTests.float_return())
+ self.assertAlmostEqual(self.MAX, GIMarshallingTests.float_return())
def test_float_in(self):
GIMarshallingTests.float_in(Number(self.MAX))
@@ -570,10 +570,10 @@ class TestFloat(unittest.TestCase):
self.assertRaises(TypeError, GIMarshallingTests.float_in, "self.MAX")
def test_float_out(self):
- self.assertAlmostEquals(self.MAX, GIMarshallingTests.float_out())
+ self.assertAlmostEqual(self.MAX, GIMarshallingTests.float_out())
def test_float_inout(self):
- self.assertAlmostEquals(self.MIN, GIMarshallingTests.float_inout(Number(self.MAX)))
+ self.assertAlmostEqual(self.MIN, GIMarshallingTests.float_inout(Number(self.MAX)))
class TestDouble(unittest.TestCase):
@@ -582,7 +582,7 @@ class TestDouble(unittest.TestCase):
MIN = GObject.constants.G_MINDOUBLE
def test_double_return(self):
- self.assertAlmostEquals(self.MAX, GIMarshallingTests.double_return())
+ self.assertAlmostEqual(self.MAX, GIMarshallingTests.double_return())
def test_double_in(self):
GIMarshallingTests.double_in(Number(self.MAX))
@@ -590,10 +590,10 @@ class TestDouble(unittest.TestCase):
self.assertRaises(TypeError, GIMarshallingTests.double_in, "self.MAX")
def test_double_out(self):
- self.assertAlmostEquals(self.MAX, GIMarshallingTests.double_out())
+ self.assertAlmostEqual(self.MAX, GIMarshallingTests.double_out())
def test_double_inout(self):
- self.assertAlmostEquals(self.MIN, GIMarshallingTests.double_inout(Number(self.MAX)))
+ self.assertAlmostEqual(self.MIN, GIMarshallingTests.double_inout(Number(self.MAX)))
class TestGType(unittest.TestCase):
@@ -689,6 +689,9 @@ class TestArray(unittest.TestCase):
def test_array_in(self):
GIMarshallingTests.array_in(Sequence([-1, 0, 1, 2]))
+ def test_array_in_len_zero_terminated(self):
+ GIMarshallingTests.array_in_len_zero_terminated(Sequence([-1, 0, 1, 2]))
+
def test_array_uint8_in(self):
GIMarshallingTests.array_uint8_in(Sequence([97, 98, 99, 100]))
GIMarshallingTests.array_uint8_in(_bytes("abcd"))
@@ -745,7 +748,7 @@ class TestArray(unittest.TestCase):
[1, 2, 3])
def test_array_in_nonzero_nonlen(self):
- GIMarshallingTests.array_in_nonzero_nonlen(1, 'abcd')
+ GIMarshallingTests.array_in_nonzero_nonlen(1, b'abcd')
def test_array_fixed_out_struct(self):
struct1, struct2 = GIMarshallingTests.array_fixed_out_struct()
@@ -795,12 +798,12 @@ class TestArrayGVariant(unittest.TestCase):
def test_array_gvariant_container_in(self):
v = [GLib.Variant("i", 27), GLib.Variant("s", "Hello")]
- returned = [GLib.Variant.unpack(r) for r in GIMarshallingTests.array_gvariant_none_in(v)]
+ returned = [GLib.Variant.unpack(r) for r in GIMarshallingTests.array_gvariant_container_in(v)]
self.assertEqual([27, "Hello"], returned)
def test_array_gvariant_full_in(self):
v = [GLib.Variant("i", 27), GLib.Variant("s", "Hello")]
- returned = [GLib.Variant.unpack(r) for r in GIMarshallingTests.array_gvariant_none_in(v)]
+ returned = [GLib.Variant.unpack(r) for r in GIMarshallingTests.array_gvariant_full_in(v)]
self.assertEqual([27, "Hello"], returned)
def test_bytearray_gvariant(self):
@@ -1036,6 +1039,9 @@ class TestGValue(unittest.TestCase):
def test_gvalue_out(self):
self.assertEqual(42, GIMarshallingTests.gvalue_out())
+ def test_gvalue_out_caller_allocates(self):
+ self.assertEqual(42, GIMarshallingTests.gvalue_out_caller_allocates())
+
def test_gvalue_inout(self):
self.assertEqual('42', GIMarshallingTests.gvalue_inout(42))
value = GObject.Value()
@@ -1608,6 +1614,24 @@ class TestPythonGObject(unittest.TestCase):
GIMarshallingTests.Object.do_method_with_default_implementation(self, int8)
self.props.int += int8
+ def do_vfunc_return_value_only(self):
+ return 4242
+
+ def do_vfunc_one_out_parameter(self):
+ return 42.42
+
+ def do_vfunc_multiple_out_parameters(self):
+ return (42.42, 3.14)
+
+ def do_vfunc_return_value_and_one_out_parameter(self):
+ return (5, 42)
+
+ def do_vfunc_return_value_and_multiple_out_parameters(self):
+ return (5, 42, 99)
+
+ def do_vfunc_caller_allocated_out_parameter(self):
+ return 'hello'
+
class SubObject(GIMarshallingTests.SubObject):
def __init__(self, int):
GIMarshallingTests.SubObject.__init__(self)
@@ -1634,6 +1658,18 @@ class TestPythonGObject(unittest.TestCase):
object_.method_with_default_implementation(42)
self.assertEqual(object_.props.int, 84)
+ self.assertEqual(object_.vfunc_return_value_only(), 4242)
+ self.assertAlmostEqual(object_.vfunc_one_out_parameter(), 42.42, places=5)
+
+ (a, b) = object_.vfunc_multiple_out_parameters()
+ self.assertAlmostEqual(a, 42.42, places=5)
+ self.assertAlmostEqual(b, 3.14, places=5)
+
+ self.assertEqual(object_.vfunc_return_value_and_one_out_parameter(), (5, 42))
+ self.assertEqual(object_.vfunc_return_value_and_multiple_out_parameters(), (5, 42, 99))
+
+ self.assertEqual(object_.vfunc_caller_allocated_out_parameter(), 'hello')
+
class ObjectWithoutVFunc(GIMarshallingTests.Object):
def __init__(self, int):
GIMarshallingTests.Object.__init__(self)
@@ -1693,6 +1729,33 @@ class TestPythonGObject(unittest.TestCase):
GIMarshallingTests.SubSubObject.do_method_deep_hierarchy(sub_sub_sub_object, 5)
self.assertEqual(sub_sub_sub_object.props.int, 5)
+ def test_python_subsubobject_vfunc(self):
+ class PySubObject(GIMarshallingTests.Object):
+ def __init__(self):
+ GIMarshallingTests.Object.__init__(self)
+ self.sub_method_int8_called = 0
+
+ def do_method_int8_in(self, int8):
+ self.sub_method_int8_called += 1
+
+ class PySubSubObject(PySubObject):
+ def __init__(self):
+ PySubObject.__init__(self)
+ self.subsub_method_int8_called = 0
+
+ def do_method_int8_in(self, int8):
+ self.subsub_method_int8_called += 1
+
+ so = PySubObject()
+ so.method_int8_in(1)
+ self.assertEqual(so.sub_method_int8_called, 1)
+
+ # it should call the method on the SubSub object only
+ sso = PySubSubObject()
+ sso.method_int8_in(1)
+ self.assertEqual(sso.subsub_method_int8_called, 1)
+ self.assertEqual(sso.sub_method_int8_called, 0)
+
def test_callback_in_vfunc(self):
class SubObject(GIMarshallingTests.Object):
def __init__(self):
@@ -1987,6 +2050,9 @@ class TestPropertiesObject(unittest.TestCase):
self.obj.props.some_boolean = True
self.assertEqual(self.obj.props.some_boolean, True)
+ obj = GIMarshallingTests.PropertiesObject(some_boolean=True)
+ self.assertEqual(obj.props.some_boolean, True)
+
@unittest.expectedFailure
def test_char(self):
# gobject-introspection thinks it has a guint8 type tag, which is
@@ -1999,47 +2065,147 @@ class TestPropertiesObject(unittest.TestCase):
GLib.log_set_always_fatal(old_mask)
+ obj = GIMarshallingTests.PropertiesObject(some_char=-42)
+ self.assertEqual(obj.props.some_char, -42)
+
def test_uchar(self):
self.assertEqual(self.obj.props.some_uchar, 0)
self.obj.props.some_uchar = GObject.G_MAXUINT8
self.assertEqual(self.obj.props.some_uchar, GObject.G_MAXUINT8)
+ obj = GIMarshallingTests.PropertiesObject(some_uchar=42)
+ self.assertEqual(obj.props.some_uchar, 42)
+
def test_int(self):
self.assertEqual(self.obj.props.some_int, 0)
self.obj.props.some_int = GObject.G_MAXINT
self.assertEqual(self.obj.props.some_int, GObject.G_MAXINT)
+ obj = GIMarshallingTests.PropertiesObject(some_int=-42)
+ self.assertEqual(obj.props.some_int, -42)
+
+ self.assertRaises(TypeError, setattr, self.obj.props, 'some_int', 'foo')
+ self.assertRaises(TypeError, setattr, self.obj.props, 'some_int', None)
+
+ self.assertEqual(obj.props.some_int, -42)
+
def test_uint(self):
self.assertEqual(self.obj.props.some_uint, 0)
self.obj.props.some_uint = GObject.G_MAXUINT
self.assertEqual(self.obj.props.some_uint, GObject.G_MAXUINT)
+ obj = GIMarshallingTests.PropertiesObject(some_uint=42)
+ self.assertEqual(obj.props.some_uint, 42)
+
+ self.assertRaises(TypeError, setattr, self.obj.props, 'some_uint', 'foo')
+ self.assertRaises(TypeError, setattr, self.obj.props, 'some_uint', None)
+
+ self.assertEqual(obj.props.some_uint, 42)
+
def test_long(self):
self.assertEqual(self.obj.props.some_long, 0)
self.obj.props.some_long = GObject.G_MAXLONG
self.assertEqual(self.obj.props.some_long, GObject.G_MAXLONG)
+ obj = GIMarshallingTests.PropertiesObject(some_long=-42)
+ self.assertEqual(obj.props.some_long, -42)
+
+ self.assertRaises(TypeError, setattr, self.obj.props, 'some_long', 'foo')
+ self.assertRaises(TypeError, setattr, self.obj.props, 'some_long', None)
+
+ self.assertEqual(obj.props.some_long, -42)
+
def test_ulong(self):
self.assertEqual(self.obj.props.some_ulong, 0)
self.obj.props.some_ulong = GObject.G_MAXULONG
self.assertEqual(self.obj.props.some_ulong, GObject.G_MAXULONG)
+ obj = GIMarshallingTests.PropertiesObject(some_ulong=42)
+ self.assertEqual(obj.props.some_ulong, 42)
+
+ self.assertRaises(TypeError, setattr, self.obj.props, 'some_ulong', 'foo')
+ self.assertRaises(TypeError, setattr, self.obj.props, 'some_ulong', None)
+
+ self.assertEqual(obj.props.some_ulong, 42)
+
def test_int64(self):
self.assertEqual(self.obj.props.some_int64, 0)
self.obj.props.some_int64 = GObject.G_MAXINT64
self.assertEqual(self.obj.props.some_int64, GObject.G_MAXINT64)
+ obj = GIMarshallingTests.PropertiesObject(some_int64=-4200000000000000)
+ self.assertEqual(obj.props.some_int64, -4200000000000000)
+
def test_uint64(self):
self.assertEqual(self.obj.props.some_uint64, 0)
self.obj.props.some_uint64 = GObject.G_MAXUINT64
self.assertEqual(self.obj.props.some_uint64, GObject.G_MAXUINT64)
+ obj = GIMarshallingTests.PropertiesObject(some_uint64=4200000000000000)
+ self.assertEqual(obj.props.some_uint64, 4200000000000000)
+
def test_float(self):
self.assertEqual(self.obj.props.some_float, 0)
self.obj.props.some_float = GObject.G_MAXFLOAT
self.assertEqual(self.obj.props.some_float, GObject.G_MAXFLOAT)
+ obj = GIMarshallingTests.PropertiesObject(some_float=42.42)
+ self.assertAlmostEqual(obj.props.some_float, 42.42, 4)
+
+ obj = GIMarshallingTests.PropertiesObject(some_float=42)
+ self.assertAlmostEqual(obj.props.some_float, 42.0, 4)
+
+ self.assertRaises(TypeError, setattr, self.obj.props, 'some_float', 'foo')
+ self.assertRaises(TypeError, setattr, self.obj.props, 'some_float', None)
+
+ self.assertAlmostEqual(obj.props.some_float, 42.0, 4)
+
def test_double(self):
self.assertEqual(self.obj.props.some_double, 0)
self.obj.props.some_double = GObject.G_MAXDOUBLE
self.assertEqual(self.obj.props.some_double, GObject.G_MAXDOUBLE)
+
+ obj = GIMarshallingTests.PropertiesObject(some_double=42.42)
+ self.assertAlmostEqual(obj.props.some_double, 42.42)
+
+ obj = GIMarshallingTests.PropertiesObject(some_double=42)
+ self.assertAlmostEqual(obj.props.some_double, 42.0)
+
+ self.assertRaises(TypeError, setattr, self.obj.props, 'some_double', 'foo')
+ self.assertRaises(TypeError, setattr, self.obj.props, 'some_double', None)
+
+ self.assertAlmostEqual(obj.props.some_double, 42.0)
+
+ def test_strv(self):
+ self.assertEqual(self.obj.props.some_strv, [])
+ self.obj.props.some_strv = ['hello', 'world']
+ self.assertEqual(self.obj.props.some_strv, ['hello', 'world'])
+
+ self.assertRaises(TypeError, setattr, self.obj.props, 'some_strv', 1)
+ self.assertRaises(TypeError, setattr, self.obj.props, 'some_strv', 'foo')
+ self.assertRaises(TypeError, setattr, self.obj.props, 'some_strv', [1, 2])
+ self.assertRaises(TypeError, setattr, self.obj.props, 'some_strv', ['foo', 1])
+
+ self.assertEqual(self.obj.props.some_strv, ['hello', 'world'])
+
+ obj = GIMarshallingTests.PropertiesObject(some_strv=['hello', 'world'])
+ self.assertEqual(obj.props.some_strv, ['hello', 'world'])
+
+ def test_boxed_struct(self):
+ self.assertEqual(self.obj.props.some_boxed_struct, None)
+
+ class GStrv(list):
+ __gtype__ = GObject.TYPE_STRV
+
+ struct1 = GIMarshallingTests.BoxedStruct()
+ struct1.long_ = 1
+
+ self.obj.props.some_boxed_struct = struct1
+ self.assertEqual(self.obj.props.some_boxed_struct.long_, 1)
+ self.assertEqual(self.obj.some_boxed_struct.long_, 1)
+
+ self.assertRaises(TypeError, setattr, self.obj.props, 'some_boxed_struct', 1)
+ self.assertRaises(TypeError, setattr, self.obj.props, 'some_boxed_struct', 'foo')
+
+ obj = GIMarshallingTests.PropertiesObject(some_boxed_struct=struct1)
+ self.assertEqual(obj.props.some_boxed_struct.long_, 1)
diff --git a/tests/test_gobject.py b/tests/test_gobject.py
index 5a4284e..d225d50 100644
--- a/tests/test_gobject.py
+++ b/tests/test_gobject.py
@@ -1,5 +1,6 @@
# -*- Mode: Python -*-
+import gc
import unittest
from gi.repository import GObject
@@ -346,5 +347,153 @@ class TestContextManagers(unittest.TestCase):
self.obj.props.prop = 2
self.assertEqual(self.tracking, [2])
+
+class TestPropertyBindings(unittest.TestCase):
+ class TestObject(GObject.GObject):
+ int_prop = GObject.Property(default=0, type=int)
+
+ def setUp(self):
+ self.source = self.TestObject()
+ self.target = self.TestObject()
+
+ def testDefaultBinding(self):
+ binding = self.source.bind_property('int_prop', self.target, 'int_prop',
+ GObject.BindingFlags.DEFAULT)
+ binding = binding # PyFlakes
+
+ # Test setting value on source gets pushed to target
+ self.source.int_prop = 1
+ self.assertEqual(self.source.int_prop, 1)
+ self.assertEqual(self.target.int_prop, 1)
+
+ # Test setting value on target does not change source
+ self.target.props.int_prop = 2
+ self.assertEqual(self.source.int_prop, 1)
+ self.assertEqual(self.target.int_prop, 2)
+
+ def testBiDirectionalBinding(self):
+ binding = self.source.bind_property('int_prop', self.target, 'int_prop',
+ GObject.BindingFlags.BIDIRECTIONAL)
+ binding = binding # PyFlakes
+
+ # Test setting value on source gets pushed to target
+ self.source.int_prop = 1
+ self.assertEqual(self.source.int_prop, 1)
+ self.assertEqual(self.target.int_prop, 1)
+
+ # Test setting value on target also changes source
+ self.target.props.int_prop = 2
+ self.assertEqual(self.source.int_prop, 2)
+ self.assertEqual(self.target.int_prop, 2)
+
+ def testTransformToOnly(self):
+ def transform_to(binding, value, user_data=None):
+ self.assertEqual(user_data, 'test-data')
+ return value * 2
+
+ binding = self.source.bind_property('int_prop', self.target, 'int_prop',
+ GObject.BindingFlags.DEFAULT,
+ transform_to, None, 'test-data')
+ binding = binding # PyFlakes
+
+ self.source.int_prop = 1
+ self.assertEqual(self.source.int_prop, 1)
+ self.assertEqual(self.target.int_prop, 2)
+
+ self.target.props.int_prop = 1
+ self.assertEqual(self.source.int_prop, 1)
+ self.assertEqual(self.target.int_prop, 1)
+
+ def testTransformFromOnly(self):
+ def transform_from(binding, value, user_data=None):
+ self.assertEqual(user_data, None)
+ return value * 2
+
+ binding = self.source.bind_property('int_prop', self.target, 'int_prop',
+ GObject.BindingFlags.BIDIRECTIONAL,
+ None, transform_from)
+ binding = binding # PyFlakes
+
+ self.source.int_prop = 1
+ self.assertEqual(self.source.int_prop, 1)
+ self.assertEqual(self.target.int_prop, 1)
+
+ self.target.props.int_prop = 1
+ self.assertEqual(self.source.int_prop, 2)
+ self.assertEqual(self.target.int_prop, 1)
+
+ def testTransformBidrectional(self):
+ def transform_to(binding, value, user_data=None):
+ self.assertEqual(user_data, 'test-data')
+ return value * 2
+
+ def transform_from(binding, value, user_data=None):
+ self.assertEqual(user_data, 'test-data')
+ return value / 2
+
+ # bidirectional bindings
+ binding = self.source.bind_property('int_prop', self.target, 'int_prop',
+ GObject.BindingFlags.BIDIRECTIONAL,
+ transform_to, transform_from, 'test-data')
+ binding = binding # PyFlakes
+
+ self.source.int_prop = 1
+ self.assertEqual(self.source.int_prop, 1)
+ self.assertEqual(self.target.int_prop, 2)
+
+ self.target.props.int_prop = 4
+ self.assertEqual(self.source.int_prop, 2)
+ self.assertEqual(self.target.int_prop, 4)
+
+ def testExplicitUnbindClearsConnection(self):
+ self.assertEqual(self.source.int_prop, 0)
+ self.assertEqual(self.target.int_prop, 0)
+
+ # Test deleting binding reference removes binding.
+ binding = self.source.bind_property('int_prop', self.target, 'int_prop')
+ self.source.int_prop = 1
+ self.assertEqual(self.source.int_prop, 1)
+ self.assertEqual(self.target.int_prop, 1)
+
+ binding.unbind()
+ self.assertEqual(binding(), None)
+
+ self.source.int_prop = 10
+ self.assertEqual(self.source.int_prop, 10)
+ self.assertEqual(self.target.int_prop, 1)
+
+ # An already unbound BindingWeakRef will raise if unbind is attempted a second time.
+ self.assertRaises(ValueError, binding.unbind)
+
+ def testReferenceCounts(self):
+ self.assertEqual(self.source.__grefcount__, 1)
+ self.assertEqual(self.target.__grefcount__, 1)
+
+ # Binding ref count will be 2 do to the initial ref implicitly held by
+ # the act of binding and the ref incurred by using __call__ to generate
+ # a wrapper from the weak binding ref within python.
+ binding = self.source.bind_property('int_prop', self.target, 'int_prop')
+ self.assertEqual(binding().__grefcount__, 2)
+
+ # Creating a binding does not inc refs on source and target (they are weak
+ # on the binding object itself)
+ self.assertEqual(self.source.__grefcount__, 1)
+ self.assertEqual(self.target.__grefcount__, 1)
+
+ # Use GObject.get_property because the "props" accessor leaks.
+ # Note property names are canonicalized.
+ self.assertEqual(binding().get_property('source'), self.source)
+ self.assertEqual(binding().get_property('source_property'), 'int-prop')
+ self.assertEqual(binding().get_property('target'), self.target)
+ self.assertEqual(binding().get_property('target_property'), 'int-prop')
+ self.assertEqual(binding().get_property('flags'), GObject.BindingFlags.DEFAULT)
+
+ # Delete reference to source or target and the binding should listen.
+ ref = self.source.weak_ref()
+ del self.source
+ gc.collect()
+ self.assertEqual(ref(), None)
+ self.assertEqual(binding(), None)
+
if __name__ == '__main__':
unittest.main()
diff --git a/tests/test_overrides.py b/tests/test_overrides.py
index aef20e8..0131792 100644
--- a/tests/test_overrides.py
+++ b/tests/test_overrides.py
@@ -499,13 +499,26 @@ class TestGdk(unittest.TestCase):
self.assertEqual(color.green, 200)
self.assertEqual(color.blue, 300)
self.assertEqual(color, Gdk.Color(100, 200, 300))
- self.assertNotEquals(color, Gdk.Color(1, 2, 3))
+ self.assertNotEqual(color, Gdk.Color(1, 2, 3))
+
+ def test_color_floats(self):
+ self.assertEqual(Gdk.Color(13107, 21845, 65535),
+ Gdk.Color.from_floats(0.2, 1.0 / 3.0, 1.0))
+
+ self.assertEqual(Gdk.Color(13107, 21845, 65535).to_floats(),
+ (0.2, 1.0 / 3.0, 1.0))
+
+ self.assertEqual(Gdk.RGBA(0.2, 1.0 / 3.0, 1.0, 0.5).to_color(),
+ Gdk.Color.from_floats(0.2, 1.0 / 3.0, 1.0))
+
+ self.assertEqual(Gdk.RGBA.from_color(Gdk.Color(13107, 21845, 65535)),
+ Gdk.RGBA(0.2, 1.0 / 3.0, 1.0, 1.0))
def test_rgba(self):
self.assertEqual(Gdk.RGBA, overrides.Gdk.RGBA)
rgba = Gdk.RGBA(0.1, 0.2, 0.3, 0.4)
self.assertEqual(rgba, Gdk.RGBA(0.1, 0.2, 0.3, 0.4))
- self.assertNotEquals(rgba, Gdk.RGBA(0.0, 0.2, 0.3, 0.4))
+ self.assertNotEqual(rgba, Gdk.RGBA(0.0, 0.2, 0.3, 0.4))
self.assertEqual(rgba.red, 0.1)
self.assertEqual(rgba.green, 0.2)
self.assertEqual(rgba.blue, 0.3)
@@ -513,6 +526,10 @@ class TestGdk(unittest.TestCase):
rgba.green = 0.9
self.assertEqual(rgba.green, 0.9)
+ # Iterator/tuple convsersion
+ self.assertEqual(tuple(Gdk.RGBA(0.1, 0.2, 0.3, 0.4)),
+ (0.1, 0.2, 0.3, 0.4))
+
def test_event(self):
event = Gdk.Event.new(Gdk.EventType.CONFIGURE)
self.assertEqual(event.type, Gdk.EventType.CONFIGURE)
@@ -1251,7 +1268,7 @@ class TestGtk(unittest.TestCase):
return -1
if v2.startswith('m') and not v1.startswith('m'):
return 1
- return cmp(v1, v2)
+ return (v1 > v2) - (v1 < v2)
list_store = Gtk.ListStore(int, str)
list_store.set_sort_func(2, comp1, None)
@@ -1374,7 +1391,7 @@ class TestGtk(unittest.TestCase):
for i in range(100):
label = 'this is row #%d' % i
parent = tree_store.append(None, (DerivedIntType(i), DerivedStrType(label),))
- self.assertNotEquals(parent, None)
+ self.assertNotEqual(parent, None)
for j in range(20):
label = 'this is child #%d of node #%d' % (j, i)
child = tree_store.append(parent, (j, label,))
@@ -1499,6 +1516,15 @@ class TestGtk(unittest.TestCase):
self.assertRaises(ValueError, tree_store.get, aiter, 1, 100)
self.assertEqual(tree_store.get(aiter, 0, 1), (10, 'this is row #10'))
+ # check __delitem__
+ self.assertEqual(len(tree_store), 100)
+ aiter = tree_store.get_iter(10)
+ del tree_store[aiter]
+ self.assertEqual(len(tree_store), 99)
+ self.assertRaises(TypeError, tree_store.__delitem__, None)
+ self.assertRaises(IndexError, tree_store.__delitem__, -101)
+ self.assertRaises(IndexError, tree_store.__delitem__, 101)
+
def test_tree_model_edit(self):
model = Gtk.ListStore(int, str, float)
model.append([1, "one", -0.1])
@@ -1866,8 +1892,8 @@ class TestGtk(unittest.TestCase):
hscrollbar = Gtk.HScrollbar()
vscrollbar = Gtk.VScrollbar()
- self.assertNotEquals(hscrollbar.props.adjustment, adjustment)
- self.assertNotEquals(vscrollbar.props.adjustment, adjustment)
+ self.assertNotEqual(hscrollbar.props.adjustment, adjustment)
+ self.assertNotEqual(vscrollbar.props.adjustment, adjustment)
hscrollbar = Gtk.HScrollbar(adjustment)
vscrollbar = Gtk.VScrollbar(adjustment)
diff --git a/tests/test_properties.py b/tests/test_properties.py
index 5ae2b47..d5943bf 100644
--- a/tests/test_properties.py
+++ b/tests/test_properties.py
@@ -5,11 +5,11 @@ import struct
import unittest
from gi.repository import GObject
-from gi.repository.GObject import GType, new, PARAM_READWRITE, \
+from gi.repository.GObject import GType, new, PARAM_READWRITE, \
PARAM_CONSTRUCT, PARAM_READABLE, PARAM_WRITABLE, PARAM_CONSTRUCT_ONLY
from gi.repository.GObject import \
TYPE_INT, TYPE_UINT, TYPE_LONG, TYPE_ULONG, TYPE_INT64, \
- TYPE_UINT64, TYPE_GTYPE, TYPE_INVALID, TYPE_NONE
+ TYPE_UINT64, TYPE_GTYPE, TYPE_INVALID, TYPE_NONE, TYPE_STRV
from gi.repository.GObject import \
G_MININT, G_MAXINT, G_MAXUINT, G_MINLONG, G_MAXLONG, \
G_MAXULONG
@@ -52,6 +52,9 @@ class PropertyObject(GObject.GObject):
gtype = GObject.Property(
type=TYPE_GTYPE, flags=PARAM_READWRITE | PARAM_CONSTRUCT)
+ strings = GObject.Property(
+ type=TYPE_STRV, flags=PARAM_READWRITE | PARAM_CONSTRUCT)
+
class TestProperties(unittest.TestCase):
def testGetSet(self):
@@ -84,8 +87,9 @@ class TestProperties(unittest.TestCase):
'enum',
'flags',
'gtype',
+ 'strings',
'boxed'])
- self.assertEqual(len(obj), 8)
+ self.assertEqual(len(obj), 9)
def testNormal(self):
obj = new(PropertyObject, normal="123")
@@ -230,17 +234,67 @@ class TestProperties(unittest.TestCase):
self.assertEqual(obj.props.gtype, TYPE_UINT)
self.assertEqual(obj.gtype, TYPE_UINT)
- def textBoxed(self):
+ def testBoxed(self):
obj = new(PropertyObject)
regex = GLib.Regex.new('[a-z]*', 0, 0)
obj.props.boxed = regex
self.assertEqual(obj.props.boxed.get_pattern(), '[a-z]*')
- self.assertEqual(obj.boxed.get_patttern(), '[a-z]*')
+ self.assertEqual(obj.boxed.get_pattern(), '[a-z]*')
self.assertRaises(TypeError, setattr, obj, 'boxed', 'foo')
self.assertRaises(TypeError, setattr, obj, 'boxed', object())
+ def testStrings(self):
+ obj = new(PropertyObject)
+
+ # Should work with actual GStrv objects as well as
+ # Python string lists
+ class GStrv(list):
+ __gtype__ = GObject.TYPE_STRV
+
+ self.assertEqual(obj.props.strings, GStrv([]))
+ self.assertEqual(obj.strings, GStrv([]))
+ self.assertEqual(obj.props.strings, [])
+ self.assertEqual(obj.strings, [])
+
+ obj.strings = ['hello', 'world']
+ self.assertEqual(obj.props.strings, ['hello', 'world'])
+ self.assertEqual(obj.strings, ['hello', 'world'])
+
+ obj.strings = GStrv(['hello', 'world'])
+ self.assertEqual(obj.props.strings, GStrv(['hello', 'world']))
+ self.assertEqual(obj.strings, GStrv(['hello', 'world']))
+
+ obj.strings = []
+ self.assertEqual(obj.strings, [])
+ obj.strings = GStrv([])
+ self.assertEqual(obj.strings, GStrv([]))
+
+ p = GObject.Property(type=TYPE_STRV, default=['hello', '1'])
+ self.assertEqual(p.default, ['hello', '1'])
+ self.assertEqual(p.type, TYPE_STRV)
+ p = GObject.Property(type=TYPE_STRV, default=GStrv(['hello', '1']))
+ self.assertEqual(p.default, ['hello', '1'])
+ self.assertEqual(p.type, TYPE_STRV)
+
+ # set in constructor
+ obj = new(PropertyObject, strings=['hello', 'world'])
+ self.assertEqual(obj.props.strings, ['hello', 'world'])
+ self.assertEqual(obj.strings, ['hello', 'world'])
+
+ # wrong types
+ self.assertRaises(TypeError, setattr, obj, 'strings', 1)
+ self.assertRaises(TypeError, setattr, obj, 'strings', 'foo')
+ self.assertRaises(TypeError, setattr, obj, 'strings', ['foo', 1])
+
+ self.assertRaises(TypeError, GObject.Property, type=TYPE_STRV,
+ default=1)
+ self.assertRaises(TypeError, GObject.Property, type=TYPE_STRV,
+ default='foo')
+ self.assertRaises(TypeError, GObject.Property, type=TYPE_STRV,
+ default=['hello', 1])
+
def testRange(self):
# kiwi code
def max(c):
diff --git a/tests/test_pygtkcompat.py b/tests/test_pygtkcompat.py
index 21ad863..245ee67 100644
--- a/tests/test_pygtkcompat.py
+++ b/tests/test_pygtkcompat.py
@@ -47,6 +47,7 @@ class TestGTKCompat(unittest.TestCase):
def testFlags(self):
self.assertEqual(gtk.EXPAND, Gtk.AttachOptions.EXPAND)
+ self.assertEqual(gtk.gdk.SHIFT_MASK, Gdk.ModifierType.SHIFT_MASK)
def testKeysyms(self):
import gtk.keysyms
@@ -117,6 +118,14 @@ class TestGTKCompat(unittest.TestCase):
loader = gtk.gdk.PixbufLoader('png')
loader.close()
+ def testPixbufFormats(self):
+ formats = gtk.gdk.pixbuf_get_formats()
+ self.assertEqual(type(formats[0]), dict)
+ self.assertTrue('name' in formats[0])
+ self.assertTrue('description' in formats[0])
+ self.assertTrue('mime_types' in formats[0])
+ self.assertEqual(type(formats[0]['extensions']), list)
+
def testGdkWindow(self):
w = gtk.Window()
w.realize()
diff --git a/tests/test_signal.py b/tests/test_signal.py
index 918dad4..66a7427 100644
--- a/tests/test_signal.py
+++ b/tests/test_signal.py
@@ -411,7 +411,7 @@ class TestPyGValue(unittest.TestCase):
class C(GObject.GObject):
__gsignals__ = dict(my_boxed_signal=(
GObject.SignalFlags.RUN_LAST,
- GObject.type_from_name('GStrv'), ()))
+ GObject.TYPE_STRV, ()))
obj = C()
obj.connect('my-boxed-signal', lambda obj: None)