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 746742 - Wrong include of py3cairo.h in pygi-foreign-cairo.c
Wrong include of py3cairo.h in pygi-foreign-cairo.c
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: general
Git master
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2015-03-25 13:55 UTC by Daniel Hahler
Modified: 2015-07-03 13:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
pygi-foreign-cairo.c: fix include for py3cairo.h (748 bytes, patch)
2015-07-03 13:00 UTC, Christoph Reiter (lazka)
committed Details | Review

Description Daniel Hahler 2015-03-25 13:55:14 UTC
commit 0ab00e4991f3a94979cb476ed1c690614a7eb91a
    Author: Daniel Hahler <git@thequod.de>
    Date:   Wed Mar 25 14:37:29 2015 +0100

        pygi-foreign-cairo.c: fix include for py3cairo.h
        
        The pkg-config info includes the "pycairo" folder already:
        
            % cat ~/.pyenv/versions/3.4.3/lib/pkgconfig/py3cairo.pc
            prefix=/home/user/.pyenv/versions/3.4.3
        
            Name: Pycairo
            Description: Python 3 bindings for cairo
            Version: 1.10.1
            Requires: cairo
            Cflags: -I${prefix}/include/pycairo
            Libs:

    diff --git a/gi/pygi-foreign-cairo.c b/gi/pygi-foreign-cairo.c
    index 5937759..8e76529 100644
    --- a/gi/pygi-foreign-cairo.c
    +++ b/gi/pygi-foreign-cairo.c
    @@ -28,7 +28,7 @@
     #include <pycairo.h>
     static Pycairo_CAPI_t *Pycairo_CAPI;
     #else
    -#include <pycairo/py3cairo.h>
    +#include <py3cairo.h>
     #endif
     
     #include <cairo-gobject.h>

I am a bit surprised that this wasn't reported and fixed already.

I have not investigated, but pygi-foreign-cairo.c is probably not usually included/used?

I've came across this through a recipe to install pygtk3 in pyenv (a wrapper for multiple Python versions):
https://gist.github.com/blueyed/b4424dac5749b683c9fc
Comment 1 Christoph Reiter (lazka) 2015-03-25 14:12:32 UTC
Looks good. Probably wasn't reported because "<default_search_path>/pycairo/py3cairo.h" usually exists.
Comment 2 Christoph Reiter (lazka) 2015-07-03 13:00:07 UTC
Created attachment 306706 [details] [review]
pygi-foreign-cairo.c: fix include for py3cairo.h
Comment 3 Christoph Reiter (lazka) 2015-07-03 13:01:20 UTC
pushed to master: https://git.gnome.org/browse/pygobject/commit/?id=0ee1f562c975df51ce93578d35678ef1e915e202