From 8fbc97eef60bf7c517826bd5d4079c26abb55684 Mon Sep 17 00:00:00 2001 From: Jan ONDREJ (SAL) Date: Oct 03 2021 08:29:57 +0000 Subject: Do not use use_2to3 (removed in setuptools 58+) --- diff --git a/0001-Enable-building-on-python3-along-with-changes-to-doc.patch b/0001-Enable-building-on-python3-along-with-changes-to-doc.patch index 603b17c..e86fef4 100644 --- a/0001-Enable-building-on-python3-along-with-changes-to-doc.patch +++ b/0001-Enable-building-on-python3-along-with-changes-to-doc.patch @@ -17,7 +17,7 @@ index 65fa51a..a1ad9f3 100644 author_email='armin.ronacher@active-4.com', version='1.3', url='http://github.com/mitsuhiko/speaklater', -+ use_2to3=True, ++ #use_2to3=True, py_modules=['speaklater'], description='implements a lazy string for python useful for use with gettext', long_description=get_docs(), diff --git a/0002-python3-2to3-including-doc.patch b/0002-python3-2to3-including-doc.patch new file mode 100644 index 0000000..112551c --- /dev/null +++ b/0002-python3-2to3-including-doc.patch @@ -0,0 +1,40 @@ +diff -ur speaklater-1.3/speaklater.py speaklater-1.3.py3/speaklater.py +--- speaklater-1.3/speaklater.py 2021-10-03 10:22:23.408073708 +0200 ++++ speaklater-1.3.py3/speaklater.py 2021-10-03 10:23:31.739305370 +0200 +@@ -40,10 +40,10 @@ + >>> l.translations = {u'Yes': 'Ja'} + >>> lazy_gettext = make_lazy_gettext(lambda: l.translations.get) + >>> yes = lazy_gettext(u'Yes') +- >>> print yes ++ >>> print(yes) + Ja + >>> l.translations[u'Yes'] = 'Si' +- >>> print yes ++ >>> print(yes) + Si + + Lazy strings are no real strings so if you pass this sort of string to +@@ -117,11 +117,11 @@ + def __contains__(self, key): + return key in self.value + +- def __nonzero__(self): ++ def __bool__(self): + return bool(self.value) + + def __dir__(self): +- return dir(unicode) ++ return dir(str) + + def __iter__(self): + return iter(self.value) +@@ -132,9 +132,6 @@ + def __str__(self): + return str(self.value) + +- def __unicode__(self): +- return unicode(self.value) +- + def __add__(self, other): + return self.value + other + diff --git a/python-speaklater.spec b/python-speaklater.spec index ee92718..773bcf8 100644 --- a/python-speaklater.spec +++ b/python-speaklater.spec @@ -2,7 +2,7 @@ Name: python-%{tarName} Version: 1.3 -Release: 24%{?dist} +Release: 25%{?dist} Summary: Implements a lazy string for python useful for use with gettext License: BSD URL: http://github.com/mitsuhiko/speaklater @@ -10,6 +10,7 @@ Source0: http://pypi.python.org/packages/source/s/%{tarName}/%{tarName}-% # Submitted upstream at: https://github.com/mitsuhiko/speaklater/pull/8 # Alternative approach at https://github.com/mitsuhiko/speaklater/pull/3 Patch0: 0001-Enable-building-on-python3-along-with-changes-to-doc.patch +Patch1: 0002-python3-2to3-including-doc.patch BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3-setuptools @@ -35,6 +36,7 @@ This package provides the python3 version of the module. %prep %setup -qn %{tarName}-%{version} %patch0 -p1 +%patch1 -p1 %build %py3_build @@ -54,6 +56,9 @@ popd %doc PKG-INFO README %changelog +* Sun Oct 03 2021 Ján ONDREJ (SAL) - 1.3-25 +- Do not use use_2to3 (removed in setuptools 58+) + * Fri Jul 23 2021 Fedora Release Engineering - 1.3-24 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild