From 3cf153518e6461a41aba5f60e69be22a2d884891faa70eb5549867bd7abbb05c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Fri, 3 May 2024 20:17:28 +0200 Subject: [PATCH] Sync from SUSE:SLFO:Main python-cairocffi revision 766e879e5de40c67d6f509507d1e09a7 --- .gitattributes | 23 ++++ cairocffi-1.5.1.tar.gz | 3 + python-cairocffi.changes | 226 +++++++++++++++++++++++++++++++++++++++ python-cairocffi.spec | 101 +++++++++++++++++ skip-pikepdf.patch | 52 +++++++++ 5 files changed, 405 insertions(+) create mode 100644 .gitattributes create mode 100644 cairocffi-1.5.1.tar.gz create mode 100644 python-cairocffi.changes create mode 100644 python-cairocffi.spec create mode 100644 skip-pikepdf.patch diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/cairocffi-1.5.1.tar.gz b/cairocffi-1.5.1.tar.gz new file mode 100644 index 0000000..5d95060 --- /dev/null +++ b/cairocffi-1.5.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:071ab7b72e3533300b0bfd55a52056b4ffdc1ed6e656779e2aced9b709b8a295 +size 86924 diff --git a/python-cairocffi.changes b/python-cairocffi.changes new file mode 100644 index 0000000..9de9538 --- /dev/null +++ b/python-cairocffi.changes @@ -0,0 +1,226 @@ +------------------------------------------------------------------- +Fri May 5 09:45:47 UTC 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 12:23:03 UTC 2023 - Dirk Müller + +- add sle15_python_module_pythons (jsc#PED-68) + +------------------------------------------------------------------- +Thu Apr 13 22:40:25 UTC 2023 - Matej Cepl + +- Make calling of %{sle15modernpython} optional. + +------------------------------------------------------------------- +Fri Sep 30 09:27:55 UTC 2022 - Markéta Machová + +- Avoid pulling in python-pikepdf in the stagings + +------------------------------------------------------------------- +Thu Sep 29 08:06:36 UTC 2022 - Fabian Vogt + +- Drop outdated python36_ignore + +------------------------------------------------------------------- +Tue Sep 27 17:04:28 UTC 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 15:56:49 UTC 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 21:23:34 UTC 2022 - Matej Cepl + +- Disable xcb tests (they are just too unstable, + gh#Kozea/cairocffi#203). + +------------------------------------------------------------------- +Fri Aug 19 15:40:07 UTC 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 12:09:38 UTC 2022 - John Vandenberg + +- Move tests out of runtime package +- Enable xcb tests + +------------------------------------------------------------------- +Tue Jan 4 21:18:42 UTC 2022 - Matej Cepl + +- Fix location of fduped directories + +------------------------------------------------------------------- +Wed Oct 13 08:32:20 UTC 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 22:13:03 UTC 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 12:34:39 UTC 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 06:20:59 UTC 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 07:41:31 UTC 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 12:12:15 UTC 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 10:10:32 UTC 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 12:46:25 UTC 2018 - Matej Cepl + +- Remove superfluous devel dependency for noarch package + +------------------------------------------------------------------- +Fri Jul 13 15:54:02 UTC 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 21:07:25 UTC 2018 - petr@cervinka.net + +- Add xcffib support +- Spec file cleaned + +------------------------------------------------------------------- +Wed Apr 12 19:01:15 UTC 2017 - toddrme2178@gmail.com + +- Fix download URL. + +------------------------------------------------------------------- +Wed Apr 12 17:44:02 UTC 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 14:12:05 UTC 2016 - jmatejek@suse.com + +- update for multipython build + +------------------------------------------------------------------- +Mon Feb 1 11:08:43 UTC 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 12:30:10 UTC 2015 - toddrme2178@gmail.com + +- Depend on cairo instead of cairo-tools + +------------------------------------------------------------------- +Tue Apr 28 21:13:22 UTC 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 09:27:47 UTC 2014 - toddrme2178@gmail.com + +- Require gdk-pixbuf instead of typelib(GdkPixbuf) + +------------------------------------------------------------------- +Wed Aug 27 10:06:19 UTC 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 12:32:22 UTC 2014 - toddrme2178@gmail.com + +- Initial version + diff --git a/python-cairocffi.spec b/python-cairocffi.spec new file mode 100644 index 0000000..44a30d0 --- /dev/null +++ b/python-cairocffi.spec @@ -0,0 +1,101 @@ +# +# spec file for package python-cairocffi +# +# Copyright (c) 2023 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.5.1 +Release: 0 +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.7} +BuildRequires: %{python_module cffi >= 1.1.0} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module wheel} +BuildRequires: %{python_module xcffib >= 0.3.2} +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 -k "not test_xcb_window" + +%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 diff --git a/skip-pikepdf.patch b/skip-pikepdf.patch new file mode 100644 index 0000000..2c04755 --- /dev/null +++ b/skip-pikepdf.patch @@ -0,0 +1,52 @@ +Index: cairocffi-1.5.1/cairocffi/test_cairo.py +=================================================================== +--- cairocffi-1.5.1.orig/cairocffi/test_cairo.py ++++ cairocffi-1.5.1/cairocffi/test_cairo.py +@@ -21,7 +21,6 @@ import sys + import tempfile + + import cairocffi +-import pikepdf + import pytest + + from . import ( +@@ -239,6 +238,7 @@ def test_device_scale(): + + @pytest.mark.xfail(cairo_version() < 11504, + reason='Cairo version too low') ++@pytest.mark.skip(reason="No pikepdf") + def test_metadata(): + file_obj = io.BytesIO() + surface = PDFSurface(file_obj, 1, 1) +@@ -264,6 +264,7 @@ def test_metadata(): + + @pytest.mark.xfail(cairo_version() < 11504, + reason='Cairo version too low') ++@pytest.mark.skip(reason="No pikepdf") + def test_outline(): + file_obj = io.BytesIO() + surface = PDFSurface(file_obj, 1, 1) +@@ -280,6 +281,7 @@ def test_outline(): + + @pytest.mark.xfail(cairo_version() < 11504, + reason='Cairo version too low') ++@pytest.mark.skip(reason="No pikepdf") + def test_page_label(): + file_obj = io.BytesIO() + surface = PDFSurface(file_obj, 1, 1) +@@ -291,6 +293,7 @@ def test_page_label(): + + @pytest.mark.xfail(cairo_version() < 11504, + reason='Cairo version too low') ++@pytest.mark.skip(reason="No pikepdf") + def test_tag(): + file_obj = io.BytesIO() + surface = PDFSurface(file_obj, 10, 10) +@@ -419,6 +422,7 @@ def test_pdf_versions(): + assert file_obj.getvalue().startswith(b'%PDF-1.4') + + ++@pytest.mark.skip(reason="No pikepdf") + def test_pdf_surface(): + with temp_directory() as tempdir: + filename = os.path.join(tempdir, 'foo.pdf')