From d152f7f0894e2213f764617c69e3644fe66dcae7e30cf00a0ebe438a46f9f8d1 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Mon, 7 Nov 2022 13:04:26 +0000 Subject: [PATCH 1/2] Accepting request 1034121 from home:pgajdos:python - do not require python-six - added patches fix https://github.com/kvesteri/infinity/issues/7 + python-infinity-no-six.patch OBS-URL: https://build.opensuse.org/request/show/1034121 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-infinity?expand=0&rev=7 --- python-infinity-no-six.patch | 41 ++++++++++++++++++++++++++++++++++++ python-infinity.changes | 8 +++++++ python-infinity.spec | 12 +++++++---- 3 files changed, 57 insertions(+), 4 deletions(-) create mode 100644 python-infinity-no-six.patch 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..96a184f 100644 --- a/python-infinity.changes +++ b/python-infinity.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +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 + ------------------------------------------------------------------- Sat Jun 27 02:40:34 UTC 2020 - Todd R diff --git a/python-infinity.spec b/python-infinity.spec index abf8b7b..137314c 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,8 +23,10 @@ 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 +# https://github.com/kvesteri/infinity/issues/7 +Patch0: python-infinity-no-six.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -44,6 +45,7 @@ All-in-one infinity value for Python. Can be compared to any object. %prep %setup -q -n infinity-%{version} +%patch0 -p1 %build %python_build @@ -60,6 +62,8 @@ All-in-one infinity value for Python. Can be compared to any object. %files %{python_files} %doc CHANGES.rst README.rst %license LICENSE -%{python_sitelib}/* +%{python_sitelib}/__pycache__ +%{python_sitelib}/*.py +%{python_sitelib}/infinity*-info %changelog From c50dca136ca617eb624516ce7509377a8e15b0b7b020204a8ea7fe3c16b28c7f Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Mon, 7 Nov 2022 13:11:00 +0000 Subject: [PATCH 2/2] - Fix running the test suite OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-infinity?expand=0&rev=8 --- python-infinity.changes | 1 + python-infinity.spec | 19 +++++++++---------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/python-infinity.changes b/python-infinity.changes index 96a184f..1f17501 100644 --- a/python-infinity.changes +++ b/python-infinity.changes @@ -5,6 +5,7 @@ Mon Nov 7 09:49:08 UTC 2022 - pgajdos@suse.com - 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 137314c..1afe2bd 100644 --- a/python-infinity.spec +++ b/python-infinity.spec @@ -27,14 +27,14 @@ URL: https://github.com/kvesteri/infinity Source: https://files.pythonhosted.org/packages/source/i/infinity/infinity-%{version}.tar.gz # https://github.com/kvesteri/infinity/issues/7 Patch0: python-infinity-no-six.patch -BuildRequires: %{python_module setuptools} +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 @@ -44,26 +44,25 @@ BuildArch: noarch All-in-one infinity value for Python. Can be compared to any object. %prep -%setup -q -n infinity-%{version} -%patch0 -p1 +%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}/__pycache__ -%{python_sitelib}/*.py -%{python_sitelib}/infinity*-info +%{python_sitelib}/__pycache__/infinity*.pyc +%{python_sitelib}/infinity.py +%{python_sitelib}/infinity-%{version}*-info %changelog