14
0
forked from pool/python-unify

Compare commits

4 Commits

3 changed files with 34 additions and 1 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Nov 19 11:50:22 UTC 2025 - Nico Krapp <nico.krapp@suse.com>
- Add patch version.patch to fix build with Python 3.14
-------------------------------------------------------------------
Thu Dec 12 05:44:15 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-unify
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2025 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -26,6 +26,8 @@ Source: https://github.com/myint/unify/archive/v%{version}.tar.gz
Source9: README.suse
# PATCH-FIX-OPENSUSE Do not use lib2to3
Patch0: no-more-lib2to3.patch
# PATCH-FIX-UPSTREAM version.patch
Patch1: version.patch
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}

26
version.patch Normal file
View File

@@ -0,0 +1,26 @@
Index: unify-0.5/setup.py
===================================================================
--- unify-0.5.orig/setup.py
+++ unify-0.5/setup.py
@@ -3,19 +3,14 @@
from __future__ import unicode_literals
-import ast
+import unify
from setuptools import setup
def version():
"""Return version string."""
- with open('unify.py') as input_file:
- for line in input_file:
- if line.startswith('__version__'):
- return ast.parse(line).body[0].value.s
- return None
-
+ return unify.__version__
with open('README.rst') as readme:
setup(name='unify',