From 5d6cf052326eb1156c0564b1bb7577b8d4d2f7195ffca168313c11d2688f5209 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Thu, 13 Apr 2023 10:59:28 +0000 Subject: [PATCH] Accepting request 1079118 from home:pgajdos:python - do not require six - added patches fix https://github.com/duboviy/dist/issues/8 + python-dist-no-six.patch OBS-URL: https://build.opensuse.org/request/show/1079118 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-dist?expand=0&rev=6 --- python-dist-no-six.patch | 30 ++++++++++++++++++++++++++++++ python-dist.changes | 8 ++++++++ python-dist.spec | 7 ++++--- 3 files changed, 42 insertions(+), 3 deletions(-) create mode 100644 python-dist-no-six.patch diff --git a/python-dist-no-six.patch b/python-dist-no-six.patch new file mode 100644 index 0000000..1a19e93 --- /dev/null +++ b/python-dist-no-six.patch @@ -0,0 +1,30 @@ +Index: dist-1.0.3/tests/test_performance.py +=================================================================== +--- dist-1.0.3.orig/tests/test_performance.py ++++ dist-1.0.3/tests/test_performance.py +@@ -1,8 +1,6 @@ + import math + from timeit import default_timer as timer + +-from six.moves import xrange +- + import dist + + +@@ -27,14 +25,14 @@ def test_positive_scenario(): + def test_performance(): + start_time = timer() + +- for _ in xrange(10000000): ++ for _ in range(10000000): + pure_py_dist(10.1, 12.1, 10.1, 10.1) + + pure_py_time = timer() - start_time + + start_time = timer() + +- for _ in xrange(10000000): ++ for _ in range(10000000): + dist.compute(10.1, 12.1, 10.1, 10.1) + + ext_time = timer() - start_time diff --git a/python-dist.changes b/python-dist.changes index 178bdba..8fc3864 100644 --- a/python-dist.changes +++ b/python-dist.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Apr 13 10:37:20 UTC 2023 - pgajdos@suse.com + +- do not require six +- added patches + fix https://github.com/duboviy/dist/issues/8 + + python-dist-no-six.patch + ------------------------------------------------------------------- Mon Nov 8 10:16:36 UTC 2021 - Dirk Müller diff --git a/python-dist.spec b/python-dist.spec index 80ba2c8..93804b9 100644 --- a/python-dist.spec +++ b/python-dist.spec @@ -1,7 +1,7 @@ # # spec file for package python-dist # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -25,9 +25,10 @@ License: MIT Group: Development/Languages/Python URL: https://github.com/duboviy/dist Source: https://github.com/duboviy/dist/archive/%{version}.tar.gz +# https://github.com/duboviy/dist/issues/8 +Patch0: python-dist-no-six.patch BuildRequires: %{python_module devel} BuildRequires: %{python_module setuptools} -BuildRequires: %{python_module six} BuildRequires: fdupes BuildRequires: python-rpm-macros BuildRequires: unzip @@ -42,7 +43,7 @@ and presents a time efficient practical solution, that is almost 3 times faster than similar fast pure python implementation. %prep -%setup -q -n dist-%{version} +%autosetup -p1 -n dist-%{version} %build export CFLAGS="%{optflags}"