Hello community,

here is the log from the commit of package python-cairocffi for 
openSUSE:Factory checked in at 2016-02-03 10:19:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-cairocffi (Old)
 and      /work/SRC/openSUSE:Factory/.python-cairocffi.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-cairocffi"

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-cairocffi/python-cairocffi.changes        
2015-07-03 00:16:06.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-cairocffi.new/python-cairocffi.changes   
2016-02-03 10:19:37.000000000 +0100
@@ -1,0 +2,9 @@
+Mon Feb  1 11:08:43 UTC 2016 - toddrme2...@gmail.com
+
+- update to version 0.7.2:
+  * Use ctypes.util.find_library with dlopen.
+  * Fix loading of gdk_pixbuf library on Ubuntu
+- update to version 0.7.1:
+  * Add a possible work-around for #64.
+
+-------------------------------------------------------------------

Old:
----
  cairocffi-0.6.tar.gz

New:
----
  cairocffi-0.7.2.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-cairocffi.spec ++++++
--- /var/tmp/diff_new_pack.D7e9f8/_old  2016-02-03 10:19:38.000000000 +0100
+++ /var/tmp/diff_new_pack.D7e9f8/_new  2016-02-03 10:19:38.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-cairocffi
 #
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           python-cairocffi
-Version:        0.6
+Version:        0.7.2
 Release:        0
 Summary:        Python cairo bindings based on cffi
 License:        BSD-3-Clause

++++++ cairocffi-0.6.tar.gz -> cairocffi-0.7.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cairocffi-0.6/MANIFEST.in 
new/cairocffi-0.7.2/MANIFEST.in
--- old/cairocffi-0.6/MANIFEST.in       2013-05-24 04:33:32.000000000 +0200
+++ new/cairocffi-0.7.2/MANIFEST.in     2015-06-03 13:44:03.000000000 +0200
@@ -1,3 +1,4 @@
 include README.rst CHANGES LICENSE tox.ini .coveragerc
 recursive-include docs *
 prune docs/_build
+exclude cairocffi/_ffi*.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cairocffi-0.6/PKG-INFO new/cairocffi-0.7.2/PKG-INFO
--- old/cairocffi-0.6/PKG-INFO  2014-09-23 19:10:51.000000000 +0200
+++ new/cairocffi-0.7.2/PKG-INFO        2015-08-04 16:26:46.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: cairocffi
-Version: 0.6
+Version: 0.7.2
 Summary: cffi-based cairo bindings for Python
 Home-page: https://github.com/SimonSapin/cairocffi
 Author: Simon Sapin
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cairocffi-0.6/cairocffi/__init__.py 
new/cairocffi-0.7.2/cairocffi/__init__.py
--- old/cairocffi-0.6/cairocffi/__init__.py     2014-09-23 18:21:56.000000000 
+0200
+++ new/cairocffi-0.7.2/cairocffi/__init__.py   2015-08-04 16:26:29.000000000 
+0200
@@ -11,13 +11,18 @@
 """
 
 import sys
-from cffi import FFI
+import ctypes.util
 
 from . import constants
 from .compat import FileNotFoundError
 
+try:
+    from ._ffi import ffi
+except ImportError:
+    # PyPy < 2.6 compatibility
+    from .ffi_build import ffi
 
-VERSION = '0.6'
+VERSION = '0.7.2'
 # pycairo compat:
 version = '1.10.0'
 version_info = (1, 10, 0)
@@ -26,19 +31,19 @@
 def dlopen(ffi, *names):
     """Try various names for the same library, for different platforms."""
     for name in names:
-        try:
-            return ffi.dlopen(name)
-        except OSError:
-            pass
-    # Re-raise the exception.
-    return ffi.dlopen(names[0])  # pragma: no cover
+        for lib_name in [name, 'lib' + name]:
+            try:
+                path = ctypes.util.find_library(lib_name)
+                if path:
+                    lib = ffi.dlopen(path)
+                    if lib:
+                        return lib
+            except OSError:
+                pass
+    raise OSError("dlopen() failed to load a library: %s" % ' / '.join(names))
 
 
-ffi = FFI()
-ffi.cdef(constants._CAIRO_HEADERS)
-CAIRO_NAMES = ['libcairo.so.2', 'libcairo.2.dylib', 'libcairo-2.dll',
-               'cairo', 'libcairo-2']
-cairo = dlopen(ffi, *CAIRO_NAMES)
+cairo = dlopen(ffi, 'cairo', 'cairo-2')
 
 
 class CairoError(Exception):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cairocffi-0.6/cairocffi/context.py 
new/cairocffi-0.7.2/cairocffi/context.py
--- old/cairocffi-0.6/cairocffi/context.py      2014-09-23 19:03:02.000000000 
+0200
+++ new/cairocffi-0.7.2/cairocffi/context.py    2014-12-17 00:16:20.000000000 
+0100
@@ -57,7 +57,7 @@
             point.x = coordinates[i]
             point.y = coordinates[i + 1]
             position += 1
-    path = ffi.new('cairo_path_t *', (constants.STATUS_SUCCESS, data, length))
+    path = ffi.new('cairo_path_t *', {'status': constants.STATUS_SUCCESS, 
'data': data, 'num_data': length})
     return path, data
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cairocffi-0.6/cairocffi/ffi_build.py 
new/cairocffi-0.7.2/cairocffi/ffi_build.py
--- old/cairocffi-0.6/cairocffi/ffi_build.py    1970-01-01 01:00:00.000000000 
+0100
+++ new/cairocffi-0.7.2/cairocffi/ffi_build.py  2015-06-03 13:44:03.000000000 
+0200
@@ -0,0 +1,107 @@
+# coding: utf8
+"""
+    cairocffi.ffi_build
+    ~~~~~~~~~~~~~~~~~~~
+
+    Build the cffi bindings
+
+    :copyright: Copyright 2013 by Simon Sapin
+    :license: BSD, see LICENSE for details.
+
+"""
+
+import os
+import sys
+from cffi import FFI
+
+# Path hack to import constants when this file is exec'd by setuptools
+this_file = os.path.abspath(__file__)
+this_dir = os.path.split(this_file)[0]
+sys.path.append(this_dir)
+
+import constants
+
+
+# Primary cffi definitions
+ffi = FFI()
+if hasattr(ffi, 'set_source'):
+    # PyPy < 2.6 compatibility
+    ffi.set_source('cairocffi._ffi', None)
+ffi.cdef(constants._CAIRO_HEADERS)
+
+# include xcffib cffi definitions for cairo xcb support
+try:
+    from xcffib.ffi_build import ffi as xcb_ffi
+    ffi.include(xcb_ffi)
+    ffi.cdef(constants._CAIRO_XCB_HEADERS)
+except ImportError:
+    pass
+
+# gdk pixbuf cffi definitions
+ffi_pixbuf = FFI()
+if hasattr(ffi_pixbuf, 'set_source'):
+    # PyPy < 2.6 compatibility
+    ffi_pixbuf.set_source('cairocffi._ffi_pixbuf', None)
+ffi_pixbuf.include(ffi)
+ffi_pixbuf.cdef('''
+    typedef unsigned long   gsize;
+    typedef unsigned int    guint32;
+    typedef unsigned int    guint;
+    typedef unsigned char   guchar;
+    typedef char            gchar;
+    typedef int             gint;
+    typedef gint            gboolean;
+    typedef guint32         GQuark;
+    typedef void*           gpointer;
+    typedef ...             GdkPixbufLoader;
+    typedef ...             GdkPixbufFormat;
+    typedef ...             GdkPixbuf;
+    typedef struct {
+        GQuark              domain;
+        gint                code;
+        gchar              *message;
+    } GError;
+    typedef enum {
+        GDK_COLORSPACE_RGB
+    } GdkColorspace;
+
+
+    GdkPixbufLoader * gdk_pixbuf_loader_new          (void);
+    GdkPixbufFormat * gdk_pixbuf_loader_get_format   (GdkPixbufLoader *loader);
+    GdkPixbuf *       gdk_pixbuf_loader_get_pixbuf   (GdkPixbufLoader *loader);
+    gboolean          gdk_pixbuf_loader_write        (
+        GdkPixbufLoader *loader, const guchar *buf, gsize count,
+        GError **error);
+    gboolean          gdk_pixbuf_loader_close        (
+        GdkPixbufLoader *loader, GError **error);
+
+    gchar *           gdk_pixbuf_format_get_name     (GdkPixbufFormat *format);
+
+    GdkColorspace     gdk_pixbuf_get_colorspace      (const GdkPixbuf *pixbuf);
+    int               gdk_pixbuf_get_n_channels      (const GdkPixbuf *pixbuf);
+    gboolean          gdk_pixbuf_get_has_alpha       (const GdkPixbuf *pixbuf);
+    int               gdk_pixbuf_get_bits_per_sample (const GdkPixbuf *pixbuf);
+    int               gdk_pixbuf_get_width           (const GdkPixbuf *pixbuf);
+    int               gdk_pixbuf_get_height          (const GdkPixbuf *pixbuf);
+    int               gdk_pixbuf_get_rowstride       (const GdkPixbuf *pixbuf);
+    guchar *          gdk_pixbuf_get_pixels          (const GdkPixbuf *pixbuf);
+    gsize             gdk_pixbuf_get_byte_length     (const GdkPixbuf *pixbuf);
+    gboolean          gdk_pixbuf_save_to_buffer      (
+        GdkPixbuf *pixbuf, gchar **buffer, gsize *buffer_size,
+        const char *type, GError **error, ...);
+
+    void              gdk_cairo_set_source_pixbuf    (
+        cairo_t *cr, const GdkPixbuf *pixbuf,
+        double pixbuf_x, double pixbuf_y);
+
+
+    void              g_object_ref                   (gpointer object);
+    void              g_object_unref                 (gpointer object);
+    void              g_error_free                   (GError *error);
+    void              g_type_init                    (void);
+''')
+
+
+if __name__ == '__main__':
+    ffi.compile()
+    ffi_pixbuf.compile()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cairocffi-0.6/cairocffi/pixbuf.py 
new/cairocffi-0.7.2/cairocffi/pixbuf.py
--- old/cairocffi-0.6/cairocffi/pixbuf.py       2014-05-23 15:32:37.000000000 
+0200
+++ new/cairocffi-0.7.2/cairocffi/pixbuf.py     2015-08-04 16:26:08.000000000 
+0200
@@ -11,89 +11,26 @@
 """
 
 import sys
-import ctypes
 from io import BytesIO
 from functools import partial
 from array import array
 
-import cffi
-
-from . import ffi as cairo_ffi, dlopen, ImageSurface, Context, constants
+from . import dlopen, ImageSurface, Context, constants
 from .compat import xrange
 
+try:
+    from ._ffi_pixbuf import ffi
+except ImportError:
+    # PyPy < 2.6 compatibility
+    from .ffi_build import ffi_pixbuf as ffi
 
 __all__ = ['decode_to_image_surface']
 
-
-ffi = cffi.FFI()
-ffi.include(cairo_ffi)
-ffi.cdef('''
-
-    typedef unsigned long   gsize;
-    typedef unsigned int    guint32;
-    typedef unsigned int    guint;
-    typedef unsigned char   guchar;
-    typedef char            gchar;
-    typedef int             gint;
-    typedef gint            gboolean;
-    typedef guint32         GQuark;
-    typedef void*           gpointer;
-    typedef ...             GdkPixbufLoader;
-    typedef ...             GdkPixbufFormat;
-    typedef ...             GdkPixbuf;
-    typedef struct {
-        GQuark              domain;
-        gint                code;
-        gchar              *message;
-    } GError;
-    typedef enum {
-        GDK_COLORSPACE_RGB
-    } GdkColorspace;
-
-
-    GdkPixbufLoader * gdk_pixbuf_loader_new          (void);
-    GdkPixbufFormat * gdk_pixbuf_loader_get_format   (GdkPixbufLoader *loader);
-    GdkPixbuf *       gdk_pixbuf_loader_get_pixbuf   (GdkPixbufLoader *loader);
-    gboolean          gdk_pixbuf_loader_write        (
-        GdkPixbufLoader *loader, const guchar *buf, gsize count,
-        GError **error);
-    gboolean          gdk_pixbuf_loader_close        (
-        GdkPixbufLoader *loader, GError **error);
-
-    gchar *           gdk_pixbuf_format_get_name     (GdkPixbufFormat *format);
-
-    GdkColorspace     gdk_pixbuf_get_colorspace      (const GdkPixbuf *pixbuf);
-    int               gdk_pixbuf_get_n_channels      (const GdkPixbuf *pixbuf);
-    gboolean          gdk_pixbuf_get_has_alpha       (const GdkPixbuf *pixbuf);
-    int               gdk_pixbuf_get_bits_per_sample (const GdkPixbuf *pixbuf);
-    int               gdk_pixbuf_get_width           (const GdkPixbuf *pixbuf);
-    int               gdk_pixbuf_get_height          (const GdkPixbuf *pixbuf);
-    int               gdk_pixbuf_get_rowstride       (const GdkPixbuf *pixbuf);
-    guchar *          gdk_pixbuf_get_pixels          (const GdkPixbuf *pixbuf);
-    gsize             gdk_pixbuf_get_byte_length     (const GdkPixbuf *pixbuf);
-    gboolean          gdk_pixbuf_save_to_buffer      (
-        GdkPixbuf *pixbuf, gchar **buffer, gsize *buffer_size,
-        const char *type, GError **error, ...);
-
-    void              gdk_cairo_set_source_pixbuf    (
-        cairo_t *cr, const GdkPixbuf *pixbuf,
-        double pixbuf_x, double pixbuf_y);
-
-
-    void              g_object_ref                   (gpointer object);
-    void              g_object_unref                 (gpointer object);
-    void              g_error_free                   (GError *error);
-    void              g_type_init                    (void);
-
-''')
-
-gdk_pixbuf = dlopen(ffi, 'gdk_pixbuf-2.0', 'libgdk_pixbuf-2.0-0',
-                    'libgdk_pixbuf-2.0.so')
-gobject = dlopen(ffi, 'gobject-2.0', 'libgobject-2.0-0', 'libgobject-2.0.so')
-glib = dlopen(ffi, 'glib-2.0', 'libglib-2.0-0', 'libglib-2.0.so')
+gdk_pixbuf = dlopen(ffi, 'gdk_pixbuf-2.0', 'gdk_pixbuf-2.0-0')
+gobject = dlopen(ffi, 'gobject-2.0', 'gobject-2.0-0')
+glib = dlopen(ffi, 'glib-2.0', 'glib-2.0-0')
 try:
-    gdk = dlopen(ffi, 'gdk-3', 'gdk-x11-2.0', 'libgdk-win32-2.0-0',
-                 'libgdk-x11-2.0.so')
+    gdk = dlopen(ffi, 'gdk-3', 'gdk-x11-2.0', 'gdk-win32-2.0-0')
 except OSError:
     gdk = None
 
@@ -246,15 +183,11 @@
             data[offset + 1:end:4] = green
             data[offset:end:4] = blue
 
-    if NO_FROM_BUFFER:
-        data = array('B', data)
+    data = array('B', data)
     return ImageSurface(constants.FORMAT_RGB24,
                         width, height, data, cairo_stride)
 
 
-NO_FROM_BUFFER = not hasattr(ctypes.c_char, 'from_buffer')  # PyPy
-
-
 def pixbuf_to_cairo_png(pixbuf):
     """Convert from PixBuf to ImageSurface, by going through the PNG format.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cairocffi-0.6/cairocffi/surfaces.py 
new/cairocffi-0.7.2/cairocffi/surfaces.py
--- old/cairocffi-0.6/cairocffi/surfaces.py     2014-09-23 16:08:22.000000000 
+0200
+++ new/cairocffi-0.7.2/cairocffi/surfaces.py   2015-06-03 13:44:03.000000000 
+0200
@@ -668,7 +668,7 @@
         Typical usage will be of the form::
 
             from cairocffi import ImageSurface
-            stride = ImageSurface.stride_for_width(format, width)
+            stride = ImageSurface.format_stride_for_width(format, width)
             data = bytearray(stride * height)
             surface = ImageSurface(format, width, height, data, stride)
 
@@ -720,7 +720,7 @@
         """
         return ffi.buffer(
             cairo.cairo_image_surface_get_data(self._pointer),
-            size=self.get_stride() * self.get_height())
+            self.get_stride() * self.get_height())
 
     def get_format(self):
         """Return the :ref:`FORMAT` string of the surface."""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cairocffi-0.6/cairocffi/test_xcb.py 
new/cairocffi-0.7.2/cairocffi/test_xcb.py
--- old/cairocffi-0.6/cairocffi/test_xcb.py     2014-09-23 19:02:31.000000000 
+0200
+++ new/cairocffi-0.7.2/cairocffi/test_xcb.py   2015-06-05 13:24:27.000000000 
+0200
@@ -13,12 +13,13 @@
 
 import os
 import time
-import xcffib
-import xcffib.xproto
-from xcffib.xproto import ConfigWindow, CW, EventMask, GC
 
 import pytest
 
+xcffib = pytest.importorskip('xcffib')
+import xcffib.xproto
+from xcffib.xproto import ConfigWindow, CW, EventMask, GC
+
 from . import Context, XCBSurface, cairo_version
 
 
@@ -103,10 +104,9 @@
     return gc
 
 
+@pytest.mark.xfail(cairo_version() < 11200,
+                   reason="Cairo version too low")
 def test_xcb_pixmap(xcb_conn):
-    if cairo_version() < 12000:
-        pytest.xfail()
-
     width = 10
     height = 10
 
@@ -155,10 +155,9 @@
         event = xcb_conn.poll_for_event()
 
 
+@pytest.mark.xfail(cairo_version() < 11200,
+                   reason="Cairo version too low")
 def test_xcb_window(xcb_conn):
-    if cairo_version() < 12000:
-        pytest.xfail()
-
     width = 10
     height = 10
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cairocffi-0.6/cairocffi/xcb.py 
new/cairocffi-0.7.2/cairocffi/xcb.py
--- old/cairocffi-0.6/cairocffi/xcb.py  2014-09-23 18:22:11.000000000 +0200
+++ new/cairocffi-0.7.2/cairocffi/xcb.py        2015-06-03 13:44:03.000000000 
+0200
@@ -8,15 +8,11 @@
     :copyright: Copyright 2014 by Simon Sapin
     :license: BSD, see LICENSE for details.
 """
-from xcffib import ffi as xcb_ffi, visualtype_to_c_struct
+from xcffib import visualtype_to_c_struct
 
-from . import ffi, dlopen, constants, CAIRO_NAMES
+from . import cairo, constants
 from .surfaces import Surface, SURFACE_TYPE_TO_CLASS
 
-ffi.include(xcb_ffi)
-ffi.cdef(constants._CAIRO_XCB_HEADERS)
-cairo_xcb = dlopen(ffi, *CAIRO_NAMES)
-
 
 class XCBSurface(Surface):
     """The XCB surface is used to render cairo graphics to X Window System
@@ -38,7 +34,7 @@
     def __init__(self, conn, drawable, visual, width, height):
         c_visual = visualtype_to_c_struct(visual)
 
-        p = cairo_xcb.cairo_xcb_surface_create(
+        p = cairo.cairo_xcb_surface_create(
             conn._conn, drawable, c_visual, width, height)
         Surface.__init__(self, p)
 
@@ -57,7 +53,7 @@
         :param width: integer
         :param height: integer
         """
-        cairo_xcb.cairo_xcb_surface_set_size(self._pointer, width, height)
+        cairo.cairo_xcb_surface_set_size(self._pointer, width, height)
         self._check_status()
 
 SURFACE_TYPE_TO_CLASS[constants.SURFACE_TYPE_XCB] = XCBSurface
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cairocffi-0.6/cairocffi.egg-info/PKG-INFO 
new/cairocffi-0.7.2/cairocffi.egg-info/PKG-INFO
--- old/cairocffi-0.6/cairocffi.egg-info/PKG-INFO       2014-09-23 
19:10:51.000000000 +0200
+++ new/cairocffi-0.7.2/cairocffi.egg-info/PKG-INFO     2015-08-04 
16:26:46.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: cairocffi
-Version: 0.6
+Version: 0.7.2
 Summary: cffi-based cairo bindings for Python
 Home-page: https://github.com/SimonSapin/cairocffi
 Author: Simon Sapin
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cairocffi-0.6/cairocffi.egg-info/SOURCES.txt 
new/cairocffi-0.7.2/cairocffi.egg-info/SOURCES.txt
--- old/cairocffi-0.6/cairocffi.egg-info/SOURCES.txt    2014-09-23 
19:10:51.000000000 +0200
+++ new/cairocffi-0.7.2/cairocffi.egg-info/SOURCES.txt  2015-08-04 
16:26:46.000000000 +0200
@@ -10,6 +10,7 @@
 cairocffi/compat.py
 cairocffi/constants.py
 cairocffi/context.py
+cairocffi/ffi_build.py
 cairocffi/fonts.py
 cairocffi/matrix.py
 cairocffi/patterns.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cairocffi-0.6/cairocffi.egg-info/requires.txt 
new/cairocffi-0.7.2/cairocffi.egg-info/requires.txt
--- old/cairocffi-0.6/cairocffi.egg-info/requires.txt   2014-09-23 
19:10:51.000000000 +0200
+++ new/cairocffi-0.7.2/cairocffi.egg-info/requires.txt 2015-08-04 
16:26:46.000000000 +0200
@@ -1,4 +1,4 @@
-cffi>=0.6
+cffi>=1.1.0
 
 [xcb]
-xcffib
\ No newline at end of file
+xcffib>=0.3.2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cairocffi-0.6/docs/cffi_api.rst 
new/cairocffi-0.7.2/docs/cffi_api.rst
--- old/cairocffi-0.6/docs/cffi_api.rst 2014-01-02 23:32:17.000000000 +0100
+++ new/cairocffi-0.7.2/docs/cffi_api.rst       2014-12-17 00:16:20.000000000 
+0100
@@ -132,8 +132,8 @@
 
 The program below shows a fairly standard usage of CFFI
 to access Pango’s C API.
-The :attr:`Context._pointer` pointer needs to be cast
-in order to be recognized by the new :obj:`~pango_example.ffi` object.
+The :attr:`Context._pointer` pointer can be used directly as an argument
+to CFFI functions that expect ``cairo_t *``.
 The C definitions are copied from `Pango’s`_ and `GLib’s`_ documentation.
 
 .. _Pango’s: http://developer.gnome.org/pango/stable/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cairocffi-0.6/docs/overview.rst 
new/cairocffi-0.7.2/docs/overview.rst
--- old/cairocffi-0.6/docs/overview.rst 2014-09-23 18:16:35.000000000 +0200
+++ new/cairocffi-0.7.2/docs/overview.rst       2014-09-30 12:02:48.000000000 
+0200
@@ -3,6 +3,26 @@
 
 .. currentmodule:: cairocffi
 
+Installing CFFI
+---------------
+
+cairocffi requires CFFI,
+which can be installed with pip_ but has its own dependencies
+that can be tricky to install.
+
+* On Linux, install ``python-dev`` and ``libffi-dev`` from your system’s 
package manager.
+* On OS X, install ``pkg-config`` and ``libffi``, for example with `Homebrew`_.
+  You may need to `set the PKG_CONFIG_PATH environment variable`_.
+* On Windows, consider using `Christoph Gohlke’s unofficial binary builds`_.
+
+See `CFFI’s own documentation`_ for details.
+
+.. _Homebrew: http://brew.sh/
+.. _set the PKG_CONFIG_PATH environment variable: 
http://cffi.readthedocs.org/#macos-x
+.. _Christoph Gohlke’s unofficial binary builds: 
http://www.lfd.uci.edu/~gohlke/pythonlibs/#cffi
+.. _CFFI’s own documentation: http://cffi.readthedocs.org/
+
+
 Installing cairocffi
 --------------------
 
@@ -10,9 +30,7 @@
 
     pip install cairocffi
 
-This will automatically install CFFI,
-which on CPython requires ``python-dev`` and ``libffi-dev``.
-See the `CFFI documentation`_ for details.
+This will automatically install CFFI.
 
 cairocffi can also be setup to utizile XCB support via xcffib_.
 This can also be installed automatically with pip_::
@@ -21,6 +39,9 @@
 
 In addition to other dependencies, this will install xcffib.
 
+.. _pip: http://pip-installer.org/
+.. _xcffib: https://github.com/tych0/xcffib/
+
 
 Importing
 ---------
@@ -41,9 +62,6 @@
 On Linux, the ``LD_LIBRARY_PATH`` environment variable can be used to indicate
 where to find shared libraries.
 
-.. _pip: http://pip-installer.org/
-.. _CFFI documentation: http://cffi.readthedocs.org/
-.. _xcffib: https://github.com/tych0/xcffib/
 .. _Pycairo: http://cairographics.org/pycairo/
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cairocffi-0.6/setup.cfg new/cairocffi-0.7.2/setup.cfg
--- old/cairocffi-0.6/setup.cfg 2014-09-23 19:10:51.000000000 +0200
+++ new/cairocffi-0.7.2/setup.cfg       2015-08-04 16:26:46.000000000 +0200
@@ -6,7 +6,7 @@
 upload-dir = docs/_build/html
 
 [egg_info]
-tag_build = 
-tag_date = 0
 tag_svn_revision = 0
+tag_date = 0
+tag_build = 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cairocffi-0.6/setup.py new/cairocffi-0.7.2/setup.py
--- old/cairocffi-0.6/setup.py  2014-09-23 18:16:35.000000000 +0200
+++ new/cairocffi-0.7.2/setup.py        2015-06-22 16:29:17.000000000 +0200
@@ -2,6 +2,7 @@
 from os import path
 import re
 import io
+import sys
 
 
 VERSION = re.search(
@@ -17,6 +18,28 @@
     encoding='utf-8',
 ).read()
 
+if '_cffi_backend' in sys.builtin_module_names:
+    import _cffi_backend
+    requires_cffi = "cffi==" + _cffi_backend.__version__
+else:
+    requires_cffi = "cffi>=1.1.0"
+
+# PyPy < 2.6 compatibility
+if requires_cffi.startswith("cffi==0."):
+    cffi_args = dict()
+else:
+    cffi_args = dict(cffi_modules=[
+        'cairocffi/ffi_build.py:ffi',
+        'cairocffi/ffi_build.py:ffi_pixbuf'
+    ])
+
+try:
+    import cffi
+    if cffi.__version__.startswith('0.'):
+        # https://github.com/SimonSapin/cairocffi/issues/64
+        cffi_args = dict()
+except ImportError:
+    pass
 
 setup(
     name='cairocffi',
@@ -36,6 +59,8 @@
         'Topic :: Multimedia :: Graphics',
     ],
     packages=find_packages(),
-    install_requires=['cffi>=0.6'],
-    extras_require={'xcb': ['xcffib']}
+    install_requires=[requires_cffi],
+    setup_requires=[requires_cffi],
+    extras_require={'xcb': ['xcffib>=0.3.2']},
+    **cffi_args
 )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cairocffi-0.6/tox.ini new/cairocffi-0.7.2/tox.ini
--- old/cairocffi-0.6/tox.ini   2014-09-23 18:26:26.000000000 +0200
+++ new/cairocffi-0.7.2/tox.ini 2015-08-04 15:21:54.000000000 +0200
@@ -5,20 +5,22 @@
 deps=
     pytest
     xcffib
-commands=py.test []
+commands=py.test --pyargs cairocffi []
+changedir={toxworkdir}
+passenv=DISPLAY
 
 [testenv:py26-cairo-1.8.2]
 ; Building old cairo on an modern system might require setting
 ; "png_REQUIRES=libpng" as an environment variable for ./configure
 basepython=python2.6
-setenv=LD_LIBRARY_PATH=../cairo-1.8.2/lib
+setenv=LD_LIBRARY_PATH={toxinidir}/../cairo-1.8.2/lib
 commands=
-    py.test []
+    py.test --pyargs cairocffi []
     python -c 'import cairocffi; version = cairocffi.cairo_version_string(); 
print "Cairo version", version; assert version == "1.8.2"'
 
 [testenv:py26-cairo-1.10.0]
 basepython=python2.6
-setenv=LD_LIBRARY_PATH=../cairo-1.10.0/lib
+setenv=LD_LIBRARY_PATH={toxinidir}/../cairo-1.10.0/lib
 commands=
-    py.test []
+    py.test --pyargs cairocffi []
     python -c 'import cairocffi; version = cairocffi.cairo_version_string(); 
print "Cairo version", version; assert version == "1.10.0"'


Reply via email to