diff --git a/python-cairocffi-disable-flake8-isort-for-pytest.patch b/0001-fix-test-case-due-to-pytest-module-defected.patch similarity index 46% rename from python-cairocffi-disable-flake8-isort-for-pytest.patch rename to 0001-fix-test-case-due-to-pytest-module-defected.patch index f90909e0ddfdb9adcfca64a1850a614150fd0bf0..8ada8f143781a8416c37559677fa4b69ca254f34 100644 --- a/python-cairocffi-disable-flake8-isort-for-pytest.patch +++ b/0001-fix-test-case-due-to-pytest-module-defected.patch @@ -1,8 +1,17 @@ +From e53fa1d571dcb48eb5aeef5a48393fd877b3631a Mon Sep 17 00:00:00 2001 +From: wang--ge +Date: Mon, 17 Oct 2022 11:40:56 +0800 +Subject: [PATCH] fix test case due to pytest module defected + +--- + setup.cfg | 5 ----- + 1 file changed, 5 deletions(-) + diff --git a/setup.cfg b/setup.cfg -index 34678e4..c7c74f5 100644 +index 6ab6258..27cd86e 100644 --- a/setup.cfg +++ b/setup.cfg -@@ -43,8 +43,6 @@ install_requires = +@@ -42,8 +42,6 @@ install_requires = cffi >= 1.1.0 tests_require = pytest-cov @@ -10,8 +19,8 @@ index 34678e4..c7c74f5 100644 - pytest-isort pytest-runner numpy - python_requires = >= 3.6 -@@ -62,8 +60,6 @@ doc = + python_requires = >= 3.7 +@@ -61,8 +59,6 @@ doc = test = pytest-runner pytest-cov @@ -20,7 +29,7 @@ index 34678e4..c7c74f5 100644 xcb = xcffib >= 0.3.2 -@@ -75,7 +71,6 @@ build-dir = docs/_build +@@ -74,7 +70,6 @@ build-dir = docs/_build test = pytest [tool:pytest] @@ -28,3 +37,6 @@ index 34678e4..c7c74f5 100644 norecursedirs = build dist .cache .eggs .git [flake8] +-- +2.27.0 + diff --git a/cairocffi-1.2.0.tar.gz b/cairocffi-1.2.0.tar.gz deleted file mode 100644 index e0b9364478b2cbbfed9dbfe1e0f83813e48d1b39..0000000000000000000000000000000000000000 Binary files a/cairocffi-1.2.0.tar.gz and /dev/null differ diff --git a/cairocffi-1.3.0.tar.gz b/cairocffi-1.3.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..9f3be65949e4cdbfd39784df5bfc873580636f90 Binary files /dev/null and b/cairocffi-1.3.0.tar.gz differ diff --git a/python-cairocffi-fix-pdf-datestring.patch b/python-cairocffi-fix-pdf-datestring.patch deleted file mode 100644 index 383661b338bc85d862c7c54a07cd1f734752f7dc..0000000000000000000000000000000000000000 --- a/python-cairocffi-fix-pdf-datestring.patch +++ /dev/null @@ -1,29 +0,0 @@ -commit 2af6017be9d15b5f6b5a4a394b51a22f8d2c3c54 -Author: Felix Schwarz -Date: Fri Jan 1 23:34:44 2021 +0100 - - test_metadata: add workaround for changed PDF date string in cairo 1.17.4 - -diff --git a/cairocffi/test_cairo.py b/cairocffi/test_cairo.py -index 89e6bc4..a7c0abc 100644 ---- a/cairocffi/test_cairo.py -+++ b/cairocffi/test_cairo.py -@@ -255,7 +255,17 @@ def test_metadata(): - assert b'/Creator (creator)' in pdf_bytes - assert b'/Author (author)' in pdf_bytes - assert b'/Keywords (keywords)' in pdf_bytes -- assert b"/CreationDate (20130721234600+01'00)" in pdf_bytes -+ # According to PDF 32000-1:2008, section 7.9.4 ("Dates") PDF date strings -+ # do not end with a apostrophe even though that format was described in -+ # the "PDF reference, Sixth Edition". -+ # See also: https://stackoverflow.com/q/41661477/138526 -+ # cairo 1.17.4 contains a commit which adds the apostrophe unconditionally: -+ # https://gitlab.freedesktop.org/cairo/cairo/-/issues/392#note_742384 -+ if cairo_version() == 11704: -+ expected_date_string = b"/CreationDate (20130721234600+01'00')" -+ else: -+ expected_date_string = b"/CreationDate (20130721234600+01'00)" -+ assert expected_date_string in pdf_bytes - assert b'/ModDate (20130721234600Z)' in pdf_bytes - - diff --git a/python-cairocffi.spec b/python-cairocffi.spec index c08339379b9e552a03720d6aaa2e392215edd8ee..bcf0b0826d97b2ec38420eb41f7afaae9b09e437 100644 --- a/python-cairocffi.spec +++ b/python-cairocffi.spec @@ -1,15 +1,13 @@ %global srcname cairocffi Name: python-cairocffi -Version: 1.2.0 +Version: 1.3.0 Release: 1 Summary: cffi-based cairo bindings for Python -License: BSD +License: BSD-3-Clause URL: https://pypi.python.org/pypi/cairocffi/ -Source0: https://files.pythonhosted.org/packages/source/c/cairocffi/cairocffi-1.2.0.tar.gz -Patch0: python-cairocffi-disable-flake8-isort-for-pytest.patch -# https://github.com/Kozea/cairocffi/pull/178 -Patch1: python-cairocffi-fix-pdf-datestring.patch +Source0: https://files.pythonhosted.org/packages/source/c/cairocffi/cairocffi-%{version}.tar.gz +Patch1: 0001-fix-test-case-due-to-pytest-module-defected.patch BuildArch: noarch BuildRequires: python3-devel @@ -25,6 +23,7 @@ BuildRequires: python3-numpy BuildRequires: gdk-pixbuf2 BuildRequires: gdk-pixbuf2-modules BuildRequires: xorg-x11-server-Xvfb +BuildRequires: python3-isort %global _description\ cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of\ @@ -70,5 +69,8 @@ xvfb-run %{__python3} setup.py test %{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info/ %changelog +* Mon Oct 17 2022 Ge Wang 1.3.0-1 +- Upgrade to version 1.3.0 + * Fri Feb 19 2021 Ge Wang - 1.2.0-1 - Init package