Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-Genshi for openSUSE:Factory 
checked in at 2021-07-10 22:53:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-Genshi (Old)
 and      /work/SRC/openSUSE:Factory/.python-Genshi.new.2625 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-Genshi"

Sat Jul 10 22:53:49 2021 rev:20 rq:902546 version:0.7.5

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-Genshi/python-Genshi.changes      
2021-03-21 23:20:25.172740266 +0100
+++ /work/SRC/openSUSE:Factory/.python-Genshi.new.2625/python-Genshi.changes    
2021-07-10 22:53:57.644009420 +0200
@@ -1,0 +2,7 @@
+Sat Jun 26 12:47:16 UTC 2021 - Ben Greiner <[email protected]>
+
+- Add Genshi-pr39-fix-setuptools-extension.patch in order to fix
+  failing the c extension with an updated setuptools
+  gh#edgewall/genshi#36
+
+-------------------------------------------------------------------

New:
----
  Genshi-pr39-fix-setuptools-extension.patch

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

Other differences:
------------------
++++++ python-Genshi.spec ++++++
--- /var/tmp/diff_new_pack.kKetNd/_old  2021-07-10 22:53:58.120005747 +0200
+++ /var/tmp/diff_new_pack.kKetNd/_new  2021-07-10 22:53:58.120005747 +0200
@@ -26,6 +26,8 @@
 Group:          Development/Languages/Python
 URL:            http://genshi.edgewall.org/
 Source:         
https://files.pythonhosted.org/packages/source/G/Genshi/Genshi-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM Genshi-pr39-fix-setuptools-extension.patch -- 
gh#edgewall/genshi#39 fixes gh#edgewall/genshi#36
+Patch1:         Genshi-pr39-fix-setuptools-extension.patch
 BuildRequires:  %{python_module Babel}
 BuildRequires:  %{python_module devel}
 BuildRequires:  %{python_module setuptools}
@@ -64,7 +66,7 @@
 This package contains documentation and examples.
 
 %prep
-%setup -q -n Genshi-%{version}
+%autosetup -p1 -n Genshi-%{version}
 
 %build
 %python_build

++++++ Genshi-pr39-fix-setuptools-extension.patch ++++++
>From 166f61ad73e486da34ae554107c7cb6e224bf5f8 Mon Sep 17 00:00:00 2001
From: Eli Schwartz <[email protected]>
Date: Wed, 3 Mar 2021 00:18:29 -0500
Subject: [PATCH] setup: do not use deprecated and removed 'Feature' feature

Emulate it using environment variables instead. $GENSHI_BUILD_SPEEDUP is
checked for existence and parsed as an integer boolean, with invalid
values defaulting (loudly) to 0.

Fixes #36
---
 setup.py | 35 +++++++++++++++++------------------
 1 file changed, 17 insertions(+), 18 deletions(-)

Index: Genshi-0.7.5/setup.py
===================================================================
--- Genshi-0.7.5.orig/setup.py
+++ Genshi-0.7.5/setup.py
@@ -19,11 +19,10 @@ import doctest
 from glob import glob
 import os
 try:
-    from setuptools import setup, Extension, Feature
+    from setuptools import setup, Extension
     from setuptools.command.bdist_egg import bdist_egg
 except ImportError:
     from distutils.core import setup, Extension
-    Feature = None
     bdist_egg = None
 import sys
 
@@ -64,20 +63,20 @@ available.""")
         print(exc)
 
 
-if Feature:
-    # Optional C extension module for speeding up Genshi:
-    # Not activated by default on:
-    # - PyPy (where it harms performance)
-    # - CPython >= 3.3 (the new Unicode C API is not supported yet)
-    speedups = Feature(
-        "optional C speed-enhancements",
-        standard = not is_pypy,
-        ext_modules = [
-            Extension('genshi._speedups', ['genshi/_speedups.c']),
-        ],
-    )
-else:
-    speedups = None
+# Optional C extension module for speeding up Genshi
+# Not activated by default on:
+# - PyPy (where it harms performance)
+_speedup_enable_default = 0 if is_pypy else 1
+try:
+    _speedup_enabled = int(os.getenv('GENSHI_BUILD_SPEEDUP', 
_speedup_enable_default))
+except ValueError:
+    import warnings
+    warnings.warn('GENSHI_BUILD_SPEEDUP was defined to something other than 0 
or 1; defaulting to not build...')
+    _speedup_enabled = False
+
+ext_modules = []
+if _speedup_enabled:
+    ext_modules.append(Extension('genshi._speedups', ['genshi/_speedups.c']))
 
 
 # Setuptools need some help figuring out if the egg is "zip_safe" or not
@@ -156,7 +155,7 @@ feature is a template language, which is
     genshi-text = genshi.template.plugin:TextTemplateEnginePlugin[plugin]
     """,
 
-    features = {'speedups': speedups},
+    ext_modules = ext_modules,
     cmdclass = cmdclass,
 
     **extra

Reply via email to