# # spec file for package python-cairocffi # # Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # 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/ # %{?sle15_python_module_pythons} Name: python-cairocffi Version: 1.7.1 Release: 2.4 Summary: Python cairo bindings based on cffi License: BSD-3-Clause Group: Development/Languages/Python URL: https://github.com/Kozea/cairocffi Source: https://files.pythonhosted.org/packages/source/c/cairocffi/cairocffi-%{version}.tar.gz # avoid pikepdf in Ring1, skipping the pikepdf related tests Patch1: skip-pikepdf.patch BuildRequires: %{python_module base >= 3.8} BuildRequires: %{python_module cffi >= 1.1.0} BuildRequires: %{python_module flit-core} BuildRequires: %{python_module pip} BuildRequires: %{python_module wheel} BuildRequires: %{python_module xcffib >= 0.4.0} BuildRequires: cairo Requires: cairo Requires: python-cffi >= 1.1.0 Requires: python-xcffib >= 0.3.2 BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module numpy} BuildRequires: %{python_module pytest} BuildRequires: dejavu-fonts BuildRequires: fdupes BuildRequires: gdk-pixbuf BuildRequires: python-rpm-macros BuildRequires: xvfb-run # /SECTION %python_subpackages %description cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of Python bindings and object-oriented API for cairo. Cairo is a 2D vector graphics library with support for multiple backends including image buffers, PNG, PostScript, PDF, and SVG file output. %package pixbuf Summary: Python cairo bindings based on cffi - pixbuf image loader Group: Development/Languages/Python Requires: %{name} = %{version} Requires: gdk-pixbuf %description pixbuf cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of Python bindings and object-oriented API for cairo. Cairo is a 2D vector graphics library with support for multiple backends including image buffers, PNG, PostScript, PDF, and SVG file output. This package provides the optional gdk-pixbuf image loader module. %prep %autosetup -p1 -n cairocffi-%{version} %build %pyproject_wheel %install %pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %check # Switch off test_xcb_window (gh#Kozea/cairocffi#203) %python_expand PYTHONPATH="%{buildroot}%{$python_sitelib}" xvfb-run --server-args="-screen 0 1280x1024x16" $python -m pytest --ignore cairocffi/test_xcb.py %files %{python_files} %license LICENSE %doc README.rst %{python_sitelib}/cairocffi-%{version}*-info %{python_sitelib}/cairocffi %exclude %{python_sitelib}/cairocffi/pixbuf.py* %ifpycache %exclude %{python_sitelib}/cairocffi/__pycache__/pixbuf.* %endif %files %{python_files pixbuf} %{python_sitelib}/cairocffi/pixbuf.py* %ifpycache %{python_sitelib}/cairocffi/__pycache__/pixbuf.* %endif %changelog * Wed Oct 2 2024 Matej Cepl - Readd disabling test_xcb tests. Please, don’t reenable until gh#Kozea/cairocffi#203 is fixed. * Wed Jun 19 2024 Michael Vetter - Update to 1.7.0: * #227: Add get_hairline() and set_hairline() functions * Mon Apr 29 2024 Michael Vetter - Update to 1.7.0: * Drop Python 3.7 support, add Python 3.12 support * #221: Add environment variable to set folder where DLLs are installed on Windows * #225: Use Ruff instead of Flake8 and isort - Refresh skip-pikepdf.patch * Thu Oct 19 2023 Soc Virnyl Estela - update to version 1.6.1 * use in-line ABI mode * use in-line mode for xcffib * require xcffib 0.4.0+ * update docs * build requires flit-core - remove disabling of text_xcb_window * Fri May 5 2023 Dirk Müller - update to 1.5.1: * move to pyproject.toml * Try to support and test more Python versions * Catch more errors when creating PNG files * Include utils and docs in the source package * Include all Setuptool’s building functions in custom building script * Build generated files manually when building wheels * Install xcffib if possible during the wheel generation - add skip-pikepdf.patch to skip pikepdf from tests - use LICENSE from package * Fri Apr 21 2023 Dirk Müller - add sle15_python_module_pythons (jsc#PED-68) * Thu Apr 13 2023 Matej Cepl - Make calling of %%{sle15modernpython} optional. * Fri Sep 30 2022 Markéta Machová - Avoid pulling in python-pikepdf in the stagings * Thu Sep 29 2022 Fabian Vogt - Drop outdated python36_ignore * Tue Sep 27 2022 Markéta Machová - Update to 1.4.0 * #205: Use pikepdf to parse generated PDF * #171: Don’t use deprecated pytest-runner anymore - Drop no longer needed python-cairocffi-xfail.patch and python-cairocffi-disable-linters.patch * Tue Sep 13 2022 Bjørn Lie - Add python-cairocffi-xfail.patch: Xfail some tests failing with cairo 1.17.6. - Add python-cairocffi-disable-linters.patch: Drop linters that fail with new cairo. * Sat Aug 20 2022 Matej Cepl - Disable xcb tests (they are just too unstable, gh#Kozea/cairocffi#203). * Fri Aug 19 2022 Ben Greiner - Reflect in the specfile that Python 3.6 is no longer supported upstream - Unskip python38: required by other packages - Remove python36 flavor exceptions from specfile * Sun Aug 7 2022 John Vandenberg - Move tests out of runtime package - Enable xcb tests * Tue Jan 4 2022 Matej Cepl - Fix location of fduped directories * Wed Oct 13 2021 Michael Vetter - Update to 1.3.0: * 2cd512d: Drop Python 3.6 support * #196: Fix import constants.py import * #169: Add extra library name "cairo-2.dll" * #178: Workaround for testing date string with cairo 1.17.4 * #186: Fix link in documentation * #195: Fix typo in documentation * #184, a4fc2a7: Clean .gitignore * Sat Feb 13 2021 Ben Greiner - Don't test the optional numpy support on python36 flavor, because due to NEP 29, python36-numpy is removed from TW * Mon Dec 7 2020 Benjamin Greiner - Replace obsolete pytest-runner with %%pytest macro to avoid pulling in _build directories of other flavors during testing * gh#Kozea/cairocffi#171 * gh#openSUSE/python-rpm-macros#66 * Fri Oct 30 2020 Michael Vetter - Update to 1.2.0: * #152: Add NumPy support * #143: Make write_to_png function work on hardened systems * #156: Use major version name to open shared libraries * #165: Don’t list setuptools as required for installation * Mon Sep 9 2019 mvetter@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 * Wed Jul 31 2019 pgajdos@suse.com - version update to 1.0.2 [#123]: Rely on a recent version of setuptools to handle VERSION [#120]: Don't delete _generated modules on ffi_build import Drop Python 2.6, 2.7 and 3.4 support Test with Python 3.7 Clean code, tests and packaging - do not build for python2 - run tests * Fri Jan 25 2019 mvetter@suse.com - Update to 0.9.0: * Drop Python 3.2 and 3.3 support * Test with PyPy and PyPy3 * Fix test compatibility with Cairo 1.15.12 * Add cairo library name from PyGObject for Windows * Fix pango_example.py * Fix crash with xbc tests * Clean documentation * Support Cairo features up to 1.15.12 * Tue Dec 4 2018 Matej Cepl - Remove superfluous devel dependency for noarch package * Fri Jul 13 2018 arun@gmx.de - update to version 0.8.1: * Add cairo library name provided by pygobjectwin32 * Update docstrings to list width and height params * Add width and height options to decode_to_image_surface * Fri Jan 26 2018 petr@cervinka.net - Add xcffib support - Spec file cleaned * Wed Apr 12 2017 toddrme2178@gmail.com - Fix download URL. * Wed Apr 12 2017 toddrme2178@gmail.com - Update to version 0.8.0 * Follow semver * Avoid implicit relative import * Use utf-8 instead of utf8 in headers * Keep cairo library loaded until all relevant objects are freed * Add cairo_quartz_* functions for MacOS * Use the default ReadTheDocs theme * Fix implicit casts * Fri Oct 14 2016 jmatejek@suse.com - update for multipython build * Mon Feb 1 2016 toddrme2178@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. * Wed Jul 1 2015 toddrme2178@gmail.com - Depend on cairo instead of cairo-tools * Tue Apr 28 2015 benoit.monin@gmx.fr - update to version 0.6: * #39 Add :class:xcb.XCBSurface. * #42 Add :class:Win32PrintingSurface. - add Group field to subpackage python-cairocffi-pixbuf * Wed Sep 10 2014 toddrme2178@gmail.com - Require gdk-pixbuf instead of typelib(GdkPixbuf) * Wed Aug 27 2014 toddrme2178@gmail.com - Split out optional gdk-pixbuf module. This avoids a lot of gtk dependencies for the main package, and is the recommended approach by upstream. * Tue Aug 26 2014 toddrme2178@gmail.com - Initial version