Hello community, here is the log from the commit of package python-cairocffi for openSUSE:Factory checked in at 2019-09-19 15:45:19 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-cairocffi (Old) and /work/SRC/openSUSE:Factory/.python-cairocffi.new.7948 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-cairocffi" Thu Sep 19 15:45:19 2019 rev:14 rq:729343 version:1.1.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-cairocffi/python-cairocffi.changes 2019-08-09 16:50:19.565507969 +0200 +++ /work/SRC/openSUSE:Factory/.python-cairocffi.new.7948/python-cairocffi.changes 2019-09-19 15:45:21.335360245 +0200 @@ -1,0 +2,9 @@ +Mon Sep 9 07:41:31 UTC 2019 - mvet...@suse.com + +- Update to 1.1.0: + * #135, #127, #119: Clean the way external libraries are found + * #126: Remove const char* elements from cdef + * Support Cairo features up to 1.17.2 + * Fix documentation generation + +------------------------------------------------------------------- Old: ---- cairocffi-1.0.2.tar.gz New: ---- cairocffi-1.1.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-cairocffi.spec ++++++ --- /var/tmp/diff_new_pack.kDjAOM/_old 2019-09-19 15:45:23.595359785 +0200 +++ /var/tmp/diff_new_pack.kDjAOM/_new 2019-09-19 15:45:23.599359785 +0200 @@ -12,14 +12,14 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# Please submit bugfixes or comments via http://bugs.opensuse.org/ # %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 Name: python-cairocffi -Version: 1.0.2 +Version: 1.1.0 Release: 0 Summary: Python cairo bindings based on cffi License: BSD-3-Clause ++++++ cairocffi-1.0.2.tar.gz -> cairocffi-1.1.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cairocffi-1.0.2/LICENSE new/cairocffi-1.1.0/LICENSE --- old/cairocffi-1.0.2/LICENSE 2019-02-06 22:50:12.000000000 +0100 +++ new/cairocffi-1.1.0/LICENSE 2019-03-26 11:39:43.000000000 +0100 @@ -1,31 +1,29 @@ -Copyright (c) 2013-2019 by Simon Sapin. +BSD 3-Clause License -Some rights reserved. +Copyright (c) 2013-2019, Simon Sapin and contributors. +All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: +modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * The names of the contributors may not be used to endorse or - promote products derived from this software without specific - prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cairocffi-1.0.2/PKG-INFO new/cairocffi-1.1.0/PKG-INFO --- old/cairocffi-1.0.2/PKG-INFO 2019-02-15 14:04:14.000000000 +0100 +++ new/cairocffi-1.1.0/PKG-INFO 2019-09-05 16:09:33.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: cairocffi -Version: 1.0.2 +Version: 1.1.0 Summary: cffi-based cairo bindings for Python Home-page: https://github.com/Kozea/cairocffi Author: Simon Sapin @@ -50,5 +50,5 @@ Requires-Python: >= 3.5 Description-Content-Type: text/x-rst Provides-Extra: test -Provides-Extra: xcb Provides-Extra: doc +Provides-Extra: xcb diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cairocffi-1.0.2/cairocffi/VERSION new/cairocffi-1.1.0/cairocffi/VERSION --- old/cairocffi-1.0.2/cairocffi/VERSION 2019-02-15 13:54:27.000000000 +0100 +++ new/cairocffi-1.1.0/cairocffi/VERSION 2019-09-05 16:06:18.000000000 +0200 @@ -1 +1 @@ -1.0.2 \ No newline at end of file +1.1.0 \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cairocffi-1.0.2/cairocffi/__init__.py new/cairocffi-1.1.0/cairocffi/__init__.py --- old/cairocffi-1.0.2/cairocffi/__init__.py 2019-02-06 23:23:00.000000000 +0100 +++ new/cairocffi-1.1.0/cairocffi/__init__.py 2019-08-12 15:29:06.000000000 +0200 @@ -9,8 +9,8 @@ """ -import ctypes.util import sys +from ctypes.util import find_library from pathlib import Path from . import constants @@ -18,25 +18,36 @@ VERSION = __version__ = (Path(__file__).parent / 'VERSION').read_text().strip() # supported version of cairo, used to be pycairo version too: -version = '1.16.0' -version_info = (1, 16, 0) +version = '1.17.2' +version_info = (1, 17, 2) -def dlopen(ffi, *names): +def dlopen(ffi, library_names, filenames): """Try various names for the same library, for different platforms.""" - for name in names: - for lib_name in (name, 'lib' + name): - try: - path = ctypes.util.find_library(lib_name) - lib = ffi.dlopen(path or lib_name) - if lib: - return lib - except OSError: - pass - raise OSError("dlopen() failed to load a library: %s" % ' / '.join(names)) + exceptions = [] - -cairo = dlopen(ffi, 'cairo', 'cairo-2', 'cairo-gobject-2', 'cairo.so.2') + for library_name in library_names: + library_filename = find_library(library_name) + if library_filename: + filenames = (library_filename,) + filenames + else: + exceptions.append( + 'no library called "{}" was found'.format(library_name)) + + for filename in filenames: + try: + return ffi.dlopen(filename) + except OSError as exception: # pragma: no cover + exceptions.append(exception) + + error_message = '\n'.join( # pragma: no cover + str(exception) for exception in exceptions) + raise OSError(error_message) # pragma: no cover + + +cairo = dlopen( + ffi, ('cairo', 'libcairo-2'), + ('libcairo.so', 'libcairo.2.dylib', 'libcairo-2.dll')) class _keepref(object): @@ -107,17 +118,19 @@ # Implementation is in submodules, but public API is all here. -from .surfaces import (Surface, ImageSurface, PDFSurface, PSSurface, # noqa - SVGSurface, RecordingSurface, Win32Surface, - Win32PrintingSurface) +from .surfaces import ( # noqa isort:skip + Surface, ImageSurface, PDFSurface, PSSurface, SVGSurface, RecordingSurface, + Win32Surface, Win32PrintingSurface) try: - from .xcb import XCBSurface # noqa + from .xcb import XCBSurface # noqa isort:skip except ImportError: pass -from .patterns import (Pattern, SolidPattern, SurfacePattern, # noqa - Gradient, LinearGradient, RadialGradient) -from .fonts import FontFace, ToyFontFace, ScaledFont, FontOptions # noqa -from .context import Context # noqa -from .matrix import Matrix # noqa +from .patterns import ( # noqa isort:skip + Pattern, SolidPattern, SurfacePattern, Gradient, LinearGradient, + RadialGradient) +from .fonts import ( # noqa isort:skip + FontFace, ToyFontFace, ScaledFont, FontOptions) +from .context import Context # noqa isort:skip +from .matrix import Matrix # noqa isort:skip -from .constants import * # noqa +from .constants import * # noqa isort:skip diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cairocffi-1.0.2/cairocffi/constants.py new/cairocffi-1.1.0/cairocffi/constants.py --- old/cairocffi-1.0.2/cairocffi/constants.py 2019-02-06 22:11:19.000000000 +0100 +++ new/cairocffi-1.1.0/cairocffi/constants.py 2019-03-27 11:16:13.000000000 +0100 @@ -61,6 +61,8 @@ FORMAT_A1 = 3 FORMAT_RGB16_565 = 4 FORMAT_RGB30 = 5 +FORMAT_RGB96F = 6 +FORMAT_RGBA128F = 7 OPERATOR_CLEAR = 0 OPERATOR_SOURCE = 1 @@ -244,9 +246,6 @@ SVG_UNIT_PERCENT = 9 _CAIRO_HEADERS = r""" - const char* CAIRO_TAG_DEST = "cairo.dest"; - const char* CAIRO_TAG_LINK = "Link"; - int cairo_version (void); @@ -338,7 +337,9 @@ CAIRO_FORMAT_A8 = 2, CAIRO_FORMAT_A1 = 3, CAIRO_FORMAT_RGB16_565 = 4, - CAIRO_FORMAT_RGB30 = 5 + CAIRO_FORMAT_RGB30 = 5, + CAIRO_FORMAT_RGB96F = 6, + CAIRO_FORMAT_RGBA128F = 7 } cairo_format_t; typedef cairo_status_t (*cairo_write_func_t) (void *closure, @@ -1907,8 +1908,8 @@ cairo_debug_reset_static_data (void); - const int CAIRO_PDF_OUTLINE_ROOT = 0; - +const int CAIRO_PDF_OUTLINE_ROOT = 0; + typedef enum _cairo_pdf_version { CAIRO_PDF_VERSION_1_4, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cairocffi-1.0.2/cairocffi/ffi_build.py new/cairocffi-1.1.0/cairocffi/ffi_build.py --- old/cairocffi-1.0.2/cairocffi/ffi_build.py 2019-02-12 10:48:26.000000000 +0100 +++ new/cairocffi-1.1.0/cairocffi/ffi_build.py 2019-08-12 15:29:06.000000000 +0200 @@ -17,7 +17,7 @@ # Path hack to import constants when this file is exec'd by setuptools sys.path.append(str(Path(__file__).parent)) -import constants # noqa +import constants # noqa isort:skip # Create an empty _generated folder if needed (Path(__file__).parent / '_generated').mkdir(exist_ok=True) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cairocffi-1.0.2/cairocffi/pixbuf.py new/cairocffi-1.1.0/cairocffi/pixbuf.py --- old/cairocffi-1.0.2/cairocffi/pixbuf.py 2019-02-06 23:22:13.000000000 +0100 +++ new/cairocffi-1.1.0/cairocffi/pixbuf.py 2019-08-12 15:29:06.000000000 +0200 @@ -19,11 +19,20 @@ __all__ = ['decode_to_image_surface'] -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') +gdk_pixbuf = dlopen( + ffi, ('gdk_pixbuf-2.0', 'libgdk_pixbuf-2.0-0'), + ('libgdk_pixbuf-2.0.so', 'libgdk_pixbuf-2.0.0.dylib', + 'libgdk_pixbuf-2.0-0.dll')) +gobject = dlopen( + ffi, ('gobject-2.0', 'libgobject-2.0-0'), + ('libgobject-2.0.so', 'libgobject-2.0.dylib', 'libgobject-2.0-0.dll')) +glib = dlopen( + ffi, ('glib-2.0', 'libglib-2.0-0'), + ('libglib-2.0.so', 'libglib-2.0.dylib', 'libglib-2.0-0.dll')) try: - gdk = dlopen(ffi, 'gdk-3', 'gdk-x11-2.0', 'gdk-win32-2.0-0') + gdk = dlopen( + ffi, ('gdk-3', 'libgdk-3-0'), + ('libgdk-3.so', 'libgdk-3.0.dylib', 'libgdk-3-0.dll')) except OSError: gdk = None diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cairocffi-1.0.2/cairocffi/test_cairo.py new/cairocffi-1.1.0/cairocffi/test_cairo.py --- old/cairocffi-1.0.2/cairocffi/test_cairo.py 2019-02-06 22:50:54.000000000 +0100 +++ new/cairocffi-1.1.0/cairocffi/test_cairo.py 2019-08-12 15:29:06.000000000 +0200 @@ -23,16 +23,15 @@ import cairocffi import pytest -from . import (PDF_METADATA_AUTHOR, PDF_METADATA_CREATE_DATE, - PDF_METADATA_CREATOR, PDF_METADATA_KEYWORDS, - PDF_METADATA_MOD_DATE, PDF_METADATA_SUBJECT, PDF_METADATA_TITLE, - PDF_OUTLINE_FLAG_BOLD, PDF_OUTLINE_FLAG_OPEN, PDF_OUTLINE_ROOT, - SVG_UNIT_PC, SVG_UNIT_PT, SVG_UNIT_PX, TAG_LINK, Context, - FontFace, FontOptions, ImageSurface, LinearGradient, Matrix, - Pattern, PDFSurface, PSSurface, RadialGradient, - RecordingSurface, ScaledFont, SolidPattern, Surface, - SurfacePattern, SVGSurface, ToyFontFace, cairo_version, - cairo_version_string) +from . import ( + PDF_METADATA_AUTHOR, PDF_METADATA_CREATE_DATE, PDF_METADATA_CREATOR, + PDF_METADATA_KEYWORDS, PDF_METADATA_MOD_DATE, PDF_METADATA_SUBJECT, + PDF_METADATA_TITLE, PDF_OUTLINE_FLAG_BOLD, PDF_OUTLINE_FLAG_OPEN, + PDF_OUTLINE_ROOT, SVG_UNIT_PC, SVG_UNIT_PT, SVG_UNIT_PX, TAG_LINK, Context, + FontFace, FontOptions, ImageSurface, LinearGradient, Matrix, Pattern, + PDFSurface, PSSurface, RadialGradient, RecordingSurface, ScaledFont, + SolidPattern, Surface, SurfacePattern, SVGSurface, ToyFontFace, + cairo_version, cairo_version_string) if sys.byteorder == 'little': def pixel(argb): # pragma: no cover @@ -61,7 +60,7 @@ def assert_raise_finished(func, *args, **kwargs): with pytest.raises(cairocffi.CairoError) as exc: func(*args, **kwargs) - assert 'SURFACE_FINISHED' in str(exc) + assert 'SURFACE_FINISHED' in str(exc) or 'ExceptionInfo' in str(exc) def test_cairo_version(): @@ -1065,10 +1064,10 @@ assert context.get_font_matrix().as_tuple() == (14, 0, 0, 14, 0, 0) context.set_font_size(10) - context.select_font_face(b'serif', cairocffi.FONT_SLANT_ITALIC) + context.select_font_face(b'@cairo:serif', cairocffi.FONT_SLANT_ITALIC) font_face = context.get_font_face() assert isinstance(font_face, ToyFontFace) - assert font_face.get_family() == 'serif' + assert font_face.get_family() == '@cairo:serif' assert font_face.get_slant() == cairocffi.FONT_SLANT_ITALIC assert font_face.get_weight() == cairocffi.FONT_WEIGHT_NORMAL @@ -1085,14 +1084,13 @@ ascent, descent, height, max_x_advance, max_y_advance = ( context.font_extents()) # That’s about all we can assume for a default font. -# assert height > ascent + descent # Not even this is true on all fonts assert max_x_advance > 0 assert max_y_advance == 0 _, _, _, _, x_advance, y_advance = context.text_extents('i' * 10) assert x_advance > 0 assert y_advance == 0 - context.set_font_face(ToyFontFace('monospace', - weight=cairocffi.FONT_WEIGHT_BOLD)) + context.set_font_face( + ToyFontFace('@cairo:monospace', weight=cairocffi.FONT_WEIGHT_BOLD)) _, _, _, _, x_advance_mono, y_advance = context.text_extents('i' * 10) assert x_advance_mono > x_advance assert y_advance == 0 @@ -1129,14 +1127,16 @@ font = ScaledFont(ToyFontFace()) font_extents = font.extents() ascent, descent, height, max_x_advance, max_y_advance = font_extents -# assert height > ascent + descent # Not even this is true on all fonts assert max_x_advance > 0 assert max_y_advance == 0 _, _, _, _, x_advance, y_advance = font.text_extents('i' * 10) assert x_advance > 0 assert y_advance == 0 - font = ScaledFont(ToyFontFace('monospace')) + font = ScaledFont(ToyFontFace('@cairo:serif')) + _, _, _, _, x_advance, y_advance = font.text_extents('i' * 10) + + font = ScaledFont(ToyFontFace('@cairo:monospace')) _, _, _, _, x_advance_mono, y_advance = font.text_extents('i' * 10) assert x_advance_mono > x_advance assert y_advance == 0 @@ -1145,7 +1145,8 @@ assert isinstance(font.get_font_face(), FontFace) font = ScaledFont( - ToyFontFace('monospace'), Matrix(xx=20, yy=20), Matrix(xx=3, yy=.5), + ToyFontFace('@cairo:monospace'), + Matrix(xx=20, yy=20), Matrix(xx=3, yy=.5), FontOptions(antialias=cairocffi.ANTIALIAS_BEST)) assert font.get_font_options().get_antialias() == cairocffi.ANTIALIAS_BEST assert font.get_font_matrix().as_tuple() == (20, 0, 0, 20, 0, 0) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cairocffi-1.0.2/cairocffi/test_xcb.py new/cairocffi-1.1.0/cairocffi/test_xcb.py --- old/cairocffi-1.0.2/cairocffi/test_xcb.py 2019-02-06 22:51:03.000000000 +0100 +++ new/cairocffi-1.1.0/cairocffi/test_xcb.py 2019-08-12 15:29:06.000000000 +0200 @@ -1,5 +1,4 @@ """ - cairocffi.test_xcb ~~~~~~~~~~~~~~~~~~ @@ -16,10 +15,11 @@ import pytest xcffib = pytest.importorskip('xcffib') # noqa -import xcffib.xproto -from xcffib.xproto import ConfigWindow, CW, EventMask, GC -from . import Context, XCBSurface, cairo_version +import xcffib.xproto # noqa isort:skip +from xcffib.xproto import ConfigWindow, CW, EventMask, GC # noqa isort:skip + +from . import Context, XCBSurface, cairo_version # noqa isort:skip @pytest.fixture diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cairocffi-1.0.2/cairocffi.egg-info/PKG-INFO new/cairocffi-1.1.0/cairocffi.egg-info/PKG-INFO --- old/cairocffi-1.0.2/cairocffi.egg-info/PKG-INFO 2019-02-15 14:04:14.000000000 +0100 +++ new/cairocffi-1.1.0/cairocffi.egg-info/PKG-INFO 2019-09-05 16:09:33.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: cairocffi -Version: 1.0.2 +Version: 1.1.0 Summary: cffi-based cairo bindings for Python Home-page: https://github.com/Kozea/cairocffi Author: Simon Sapin @@ -50,5 +50,5 @@ Requires-Python: >= 3.5 Description-Content-Type: text/x-rst Provides-Extra: test -Provides-Extra: xcb Provides-Extra: doc +Provides-Extra: xcb diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cairocffi-1.0.2/setup.cfg new/cairocffi-1.1.0/setup.cfg --- old/cairocffi-1.0.2/setup.cfg 2019-02-15 14:04:14.000000000 +0100 +++ new/cairocffi-1.1.0/setup.cfg 2019-09-05 16:09:33.000000000 +0200 @@ -84,9 +84,7 @@ [isort] default_section = THIRDPARTY -skip = - cairocffi/ffi_build.py - cairocffi/test_xcb.py +multi_line_output = 4 [coverage:report] exclude_lines =