After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 623021 - Remove the dependency on libcairo and pycairo
Remove the dependency on libcairo and pycairo
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: introspection
unspecified
Other All
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2010-06-28 09:23 UTC by Tomeu Vizoso
Modified: 2010-06-29 08:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Remove pygi-external.h (7.32 KB, patch)
2010-06-28 09:23 UTC, Tomeu Vizoso
none Details | Review
Build the cairo shim as a python module so the _gi module stops linking to it (14.93 KB, patch)
2010-06-28 09:23 UTC, Tomeu Vizoso
none Details | Review
Remove pygi-external.h (7.65 KB, patch)
2010-06-28 10:29 UTC, Tomeu Vizoso
none Details | Review
Remove pygi-external.h (7.65 KB, patch)
2010-06-28 10:30 UTC, Tomeu Vizoso
none Details | Review
Build the cairo shim as a python module so the _gi module stops linking to it (14.92 KB, patch)
2010-06-28 10:30 UTC, Tomeu Vizoso
none Details | Review
Remove pygi-external.h (7.76 KB, patch)
2010-06-28 12:24 UTC, Tomeu Vizoso
committed Details | Review
Build the cairo shim as a python module so the _gi module stops linking to it (14.95 KB, patch)
2010-06-28 12:24 UTC, Tomeu Vizoso
committed Details | Review

Description Tomeu Vizoso 2010-06-28 09:23:39 UTC
The functions required so pycairo objects can be used from introspection
libraries are contained now in a separate python module that is loaded
at runtime if needed.
Comment 1 Tomeu Vizoso 2010-06-28 09:23:41 UTC
Created attachment 164794 [details] [review]
Remove pygi-external.h
Comment 2 Tomeu Vizoso 2010-06-28 09:23:44 UTC
Created attachment 164795 [details] [review]
Build the cairo shim as a python module so the _gi module stops linking to it
Comment 3 Tomeu Vizoso 2010-06-28 10:29:59 UTC
Created attachment 164798 [details] [review]
Remove pygi-external.h
Comment 4 Tomeu Vizoso 2010-06-28 10:30:39 UTC
Created attachment 164799 [details] [review]
Remove pygi-external.h
Comment 5 Tomeu Vizoso 2010-06-28 10:30:46 UTC
Created attachment 164800 [details] [review]
Build the cairo shim as a python module so the _gi module stops linking to it
Comment 6 Tomeu Vizoso 2010-06-28 12:24:34 UTC
Created attachment 164809 [details] [review]
Remove pygi-external.h
Comment 7 Tomeu Vizoso 2010-06-28 12:24:42 UTC
Created attachment 164810 [details] [review]
Build the cairo shim as a python module so the _gi module stops linking to it
Comment 8 Johan (not receiving bugmail) Dahlin 2010-06-29 02:59:13 UTC
Review of attachment 164809 [details] [review]:

Rest looks good. Feel free to commit this with or without addressing the comment, no need for additional reviews.

::: gi/pygi-type.h
@@ +30,2 @@
 /* Public */
+PyObject *pygi_type_import_by_g_type_real (GType g_type);

Pretty bad name for a public API. Why not remove the _real suffix?
Comment 9 Johan (not receiving bugmail) Dahlin 2010-06-29 03:02:05 UTC
Review of attachment 164810 [details] [review]:

Otherwise looks good. Feel free to commit it with or without incorporating the review comments.

::: configure.ac
@@ +215,3 @@
         glib-2.0 >= glib_required_version
+    PKG_CHECK_MODULES(PYCAIRO,
+    )

Should be optional.

::: gi/pygi-argument.c
@@ +1492,3 @@
                     } else if ( (type == G_TYPE_NONE) && (g_struct_info_is_foreign (info))) {
+                            PyErr_SetString (PyExc_RuntimeError, "PyObject conversion from foreign struct failed");
+                        if (object == NULL)

Makes sense to include the name of the foreign struct in the error message.

::: gi/pygi-foreign.c
@@ +137,3 @@
+pygi_register_foreign_struct_real (const char* namespace_,
+void
+

g_slice_new
Comment 10 Tomeu Vizoso 2010-06-29 07:58:05 UTC
(In reply to comment #8)
> Review of attachment 164809 [details] [review]:
> 
> Rest looks good. Feel free to commit this with or without addressing the
> comment, no need for additional reviews.
> 
> ::: gi/pygi-type.h
> @@ +30,2 @@
>  /* Public */
> +PyObject *pygi_type_import_by_g_type_real (GType g_type);
> 
> Pretty bad name for a public API. Why not remove the _real suffix?

Because pygi_type_import_by_g_type is used for the function exported by the CAPI.

I'm going to push this one as-is, but if anybody has any better alternative, I will be glad to change it later.
Comment 11 Tomeu Vizoso 2010-06-29 08:47:29 UTC
(In reply to comment #9)
> Review of attachment 164810 [details] [review]:
> 
> Otherwise looks good. Feel free to commit it with or without incorporating the
> review comments.
> 
> ::: configure.ac
> @@ +215,3 @@
>          glib-2.0 >= glib_required_version
> +    PKG_CHECK_MODULES(PYCAIRO,
> +    )
> 
> Should be optional.

Not doing it myself for now, hopefully someone will send a patch soon.

Thanks for the reviews!