Hello community,

here is the log from the commit of package python-pycairo for openSUSE:Factory 
checked in at 2019-11-22 10:18:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pycairo (Old)
 and      /work/SRC/openSUSE:Factory/.python-pycairo.new.26869 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pycairo"

Fri Nov 22 10:18:51 2019 rev:2 rq:735641 version:1.18.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pycairo/python-pycairo.changes    
2019-06-18 14:42:42.257755871 +0200
+++ /work/SRC/openSUSE:Factory/.python-pycairo.new.26869/python-pycairo.changes 
2019-11-22 10:18:54.969368829 +0100
@@ -1,0 +2,6 @@
+Mon Oct  7 09:01:40 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Add patch to fix build on python 3.8:
+  * python38.patch
+
+-------------------------------------------------------------------

New:
----
  python38.patch

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

Other differences:
------------------
++++++ python-pycairo.spec ++++++
--- /var/tmp/diff_new_pack.zFzjx0/_old  2019-11-22 10:18:56.817368352 +0100
+++ /var/tmp/diff_new_pack.zFzjx0/_new  2019-11-22 10:18:56.821368351 +0100
@@ -23,9 +23,9 @@
 Release:        0
 Summary:        Python Bindings for Cairo
 License:        LGPL-2.1-or-later OR MPL-1.1
-Group:          Development/Libraries/Python
-Url:            http://www.cairographics.org/pycairo
+URL:            https://github.com/pygobject/pycairo
 Source:         
https://github.com/pygobject/pycairo/releases/download/v%{version}/pycairo-%{version}.tar.gz
+Patch0:         python38.patch
 BuildRequires:  %{python_module devel}
 BuildRequires:  %{python_module pytest}
 BuildRequires:  cairo-devel >= 1.13.1
@@ -36,7 +36,6 @@
 Provides:       %{oldpython}-cairo = %{version}
 Obsoletes:      %{oldpython}-cairo < %{version}
 %endif
-
 %python_subpackages
 
 %description
@@ -44,10 +43,9 @@
 
 %package        devel
 Summary:        Development files for the Cairo Python bindings
-Group:          Development/Libraries/C and C++
+Requires:       python-devel
 Requires:       python-pycairo = %{version}
 Requires:       python-pycairo-common-devel = %{version}
-Requires:       python-devel
 Provides:       python-cairo-devel = %{version}
 Obsoletes:      python-cairo-devel < %{version}
 %ifpython2
@@ -63,13 +61,12 @@
 
 %package     -n python-pycairo-common-devel
 Summary:        Headers for the Cairo Python bindings
-Group:          Development/Libraries/C and C++
-Provides:       %{python_module pycairo-common-devel = %{version}}
+Requires:       cairo-devel
 Provides:       %{python_module cairo-common-devel = %{version}}
+Provides:       %{python_module pycairo-common-devel = %{version}}
 Obsoletes:      %{python_module cairo-common-devel < %{version}}
 Provides:       python-cairo-common-devel = %{version}
 Obsoletes:      python-cairo-common-devel < %{version}
-Requires:       cairo-devel
 
 %description -n python-pycairo-common-devel
 Pycairo is a Python module providing bindings for the cairo graphics library.
@@ -78,7 +75,8 @@
 packages that depen on Pycairo.
 
 %prep
-%setup -n pycairo-%{version}
+%setup -q -n pycairo-%{version}
+%patch0 -p1
 
 %build
 %python_build

++++++ python38.patch ++++++
>From 71c81741495cdce132b6f45a0f596d70909c1e4d Mon Sep 17 00:00:00 2001
From: Christoph Reiter <[email protected]>
Date: Sat, 15 Jun 2019 16:07:00 +0200
Subject: [PATCH] enum: explicitely set enum.__str__

Python 3.8 has removed the int.__str__ implementation. So we don't fall
back to object.__str__ and thus enum.__repr__ set __str__ to int.__repr__
instead. This gives us the same behaviour with all python versions.

See https://github.com/python/cpython/commit/96aeaec64738b730
---
 cairo/enums.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/cairo/enums.c b/cairo/enums.c
index 08fbaf3..4273232 100644
--- a/cairo/enums.c
+++ b/cairo/enums.c
@@ -257,6 +257,7 @@ init_enums (PyObject *module) {
     PyObject *ev;
 
     Pycairo_IntEnum_Type.tp_repr = (reprfunc)int_enum_repr;
+    Pycairo_IntEnum_Type.tp_str = PYCAIRO_PyLong_Type.tp_repr;
     Pycairo_IntEnum_Type.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE;
     Pycairo_IntEnum_Type.tp_methods = int_enum_methods;
     Pycairo_IntEnum_Type.tp_base = &PYCAIRO_PyLong_Type;

Reply via email to