diff --git a/python-infinity-no-six.patch b/python-infinity-no-six.patch new file mode 100644 index 0000000..1380442 --- /dev/null +++ b/python-infinity-no-six.patch @@ -0,0 +1,41 @@ +Index: infinity-1.5/test_infinity.py +=================================================================== +--- infinity-1.5.orig/test_infinity.py ++++ infinity-1.5/test_infinity.py +@@ -2,7 +2,6 @@ import operator + from datetime import datetime + + import pytest +-import six + + from infinity import inf, Infinity + +@@ -59,7 +58,7 @@ class TestNegativeInfinity(InfinityTestC + value = -inf + + def test_unicode_coercion(self): +- assert six.text_type(-inf) == '-inf' ++ assert str(-inf) == '-inf' + + def test_repr(self): + assert repr(-inf) == '-inf' +@@ -125,7 +124,7 @@ class TestNegativeInfinity(InfinityTestC + + class TestInfinity(InfinityTestCase): + def test_unicode_coercion(self): +- assert six.text_type(inf) == 'inf' ++ assert str(inf) == 'inf' + + def test_float_coercion(self): + assert float(inf) == float('inf') +Index: infinity-1.5/infinity.egg-info/requires.txt +=================================================================== +--- infinity-1.5.orig/infinity.egg-info/requires.txt ++++ infinity-1.5/infinity.egg-info/requires.txt +@@ -2,6 +2,5 @@ + [test] + pytest>=2.2.3 + Pygments>=1.2 +-six>=1.4.1 + flake8>=2.4.0 + isort>=4.2.2 diff --git a/python-infinity.changes b/python-infinity.changes index 37fa48c..1f17501 100644 --- a/python-infinity.changes +++ b/python-infinity.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Nov 7 09:49:08 UTC 2022 - pgajdos@suse.com + +- do not require python-six +- added patches + fix https://github.com/kvesteri/infinity/issues/7 + + python-infinity-no-six.patch +- Fix running the test suite + ------------------------------------------------------------------- Sat Jun 27 02:40:34 UTC 2020 - Todd R diff --git a/python-infinity.spec b/python-infinity.spec index abf8b7b..1afe2bd 100644 --- a/python-infinity.spec +++ b/python-infinity.spec @@ -1,7 +1,7 @@ # # spec file for package python-infinity # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,7 +16,6 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} %bcond_without test Name: python-infinity Version: 1.5 @@ -24,16 +23,18 @@ Release: 0 Summary: All-in-one infinity value for Python License: BSD-3-Clause Group: Development/Languages/Python -Url: https://github.com/kvesteri/infinity +URL: https://github.com/kvesteri/infinity Source: https://files.pythonhosted.org/packages/source/i/infinity/infinity-%{version}.tar.gz -BuildRequires: %{python_module setuptools} +# https://github.com/kvesteri/infinity/issues/7 +Patch0: python-infinity-no-six.patch +BuildRequires: %{python_module pip} +BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros %if %{with test} BuildRequires: %{python_module flake8 >= 2.4.0} BuildRequires: %{python_module isort >= 4.2.2} BuildRequires: %{python_module pytest >= 2.2.3} -BuildRequires: %{python_module six >= 1.4.1} %endif BuildArch: noarch @@ -43,23 +44,25 @@ BuildArch: noarch All-in-one infinity value for Python. Can be compared to any object. %prep -%setup -q -n infinity-%{version} +%autosetup -p1 -n infinity-%{version} %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %if %{with test} %check -%python_exec test_infinity.py +%pytest %endif %files %{python_files} %doc CHANGES.rst README.rst %license LICENSE -%{python_sitelib}/* +%{python_sitelib}/__pycache__/infinity*.pyc +%{python_sitelib}/infinity.py +%{python_sitelib}/infinity-%{version}*-info %changelog