Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-cangjie for openSUSE:Factory 
checked in at 2024-03-05 18:50:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-cangjie (Old)
 and      /work/SRC/openSUSE:Factory/.python-cangjie.new.1770 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-cangjie"

Tue Mar  5 18:50:38 2024 rev:4 rq:1154954 version:1.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-cangjie/python-cangjie.changes    
2023-03-07 16:51:30.069953376 +0100
+++ /work/SRC/openSUSE:Factory/.python-cangjie.new.1770/python-cangjie.changes  
2024-03-05 18:50:44.393212774 +0100
@@ -1,0 +2,7 @@
+Mon Mar  4 11:22:15 UTC 2024 - Daniel Garcia <[email protected]>
+
+- Add python312.patch, gh#Cangjians/pycangjie#39
+- Remove py-compile from sources so the build process uses the one
+  provided by automake
+
+-------------------------------------------------------------------

New:
----
  python312.patch

BETA DEBUG BEGIN:
  New:
- Add python312.patch, gh#Cangjians/pycangjie#39
- Remove py-compile from sources so the build process uses the one
BETA DEBUG END:

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

Other differences:
------------------
++++++ python-cangjie.spec ++++++
--- /var/tmp/diff_new_pack.43SfW5/_old  2024-03-05 18:50:45.309246033 +0100
+++ /var/tmp/diff_new_pack.43SfW5/_new  2024-03-05 18:50:45.309246033 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-cangjie
 #
-# Copyright (c) 2023 SUSE LLC
+# 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
@@ -25,8 +25,11 @@
 URL:            http://cangjians.github.io/projects/pycangjie
 Source:         
https://github.com/Cangjians/pycangjie/releases/download/v%{version}/%{src_name}-%{version}.tar.xz
 Source99:       python-cangjie-rpmlintrc
+# PATCH-FIX-UPSTREAM python312.patch gh#Cangjians/pycangjie#39
+Patch:          python312.patch
 BuildRequires:  %{python_module Cython}
 BuildRequires:  %{python_module devel}
+BuildRequires:  %{python_module packaging}
 BuildRequires:  autoconf
 BuildRequires:  automake
 BuildRequires:  fdupes
@@ -41,8 +44,11 @@
 Python wrapper to libcangjie, the library implementing the Cangjie input 
method.
 
 %prep
-%setup -q -n %{src_name}-%{version}
+%autosetup -p1 -n %{src_name}-%{version}
 sed -i '/.\/configure/ d' autogen.sh
+# Remove distributed py-compile, this doesn't work with python 3.12,
+# removing it will use default from automake
+rm py-compile
 
 %build
 ./autogen.sh

++++++ python312.patch ++++++
>From 3f641f2011f094910f76dd981897a07bb700fb29 Mon Sep 17 00:00:00 2001
From: Sandro <[email protected]>
Date: Thu, 20 Jul 2023 01:22:15 +0200
Subject: [PATCH] Replace use of `distutils`

Python3.12 removed `distutils`.
Use `packaging.version.Version` instead.
---
 configure.ac | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: cangjie-1.3/configure.ac
===================================================================
--- cangjie-1.3.orig/configure.ac
+++ cangjie-1.3/configure.ac
@@ -38,7 +38,8 @@ CYTHON_MIN_VERSION=0.14
 AC_MSG_CHECKING(for cython version)
 CYTHON_VERSION=`$CYTHON --version 2>&1 | cut -d" " -f3`
 AC_MSG_RESULT($CYTHON_VERSION)
-$PYTHON -c "from distutils.version import StrictVersion as ver; import sys; 
sys.exit(0 if ver(\"$CYTHON_VERSION\") >= ver(\"$CYTHON_MIN_VERSION\") else 1)"
+# Version is strict. See: 
https://github.com/pypa/packaging/issues/520#issuecomment-1067119795
+$PYTHON -c "from packaging.version import Version as ver; import sys; 
sys.exit(0 if ver(\"$CYTHON_VERSION\") >= ver(\"$CYTHON_MIN_VERSION\") else 1)"
 AS_IF([test $? = 1], [AC_MSG_ERROR([Please use cython >= 
$CYTHON_MIN_VERSION])])
 
 AC_SUBST(CYTHON)

Reply via email to