diff --git a/pyperf-1.7.0.tar.gz b/pyperf-1.7.0.tar.gz deleted file mode 100644 index aa511af..0000000 --- a/pyperf-1.7.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0d214aa65e085d3e4108a36152cb12f7cd0f4e7fda93b5134b43a9687c975786 -size 174678 diff --git a/pyperf-2.0.0.tar.gz b/pyperf-2.0.0.tar.gz new file mode 100644 index 0000000..ccc1f5d --- /dev/null +++ b/pyperf-2.0.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2189fbc4af08d519f85468e70e32c902eab0f1341b2c41028b94b2832d3169a7 +size 173007 diff --git a/python-pyperf.changes b/python-pyperf.changes index fc20c3c..605edbc 100644 --- a/python-pyperf.changes +++ b/python-pyperf.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Fri Mar 20 12:42:05 UTC 2020 - Marketa Calabkova + +- Update to version 2.0.0 + * Drop Python 2 support. Use pyperf 1.7.1 if you still need Python 2.7 + support. + * Remove ``python_unicode`` metadata. + * pyperf.perf_counter() is now deprecated: use time.perf_counter() directly. + * Support Python 3.8: ``time.clock()`` no longer exists. +- Drop no longer needed patches python-retcode.patch and python38.patch + ------------------------------------------------------------------- Mon Mar 9 10:35:44 UTC 2020 - Tomáš Chvátal diff --git a/python-pyperf.spec b/python-pyperf.spec index fada720..ca85b54 100644 --- a/python-pyperf.spec +++ b/python-pyperf.spec @@ -17,34 +17,24 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} +%define skip_python2 1 Name: python-pyperf -Version: 1.7.0 +Version: 2.0.0 Release: 0 Summary: Python module to run and analyze benchmarks License: MIT URL: https://github.com/vstinner/pyperf Source: https://files.pythonhosted.org/packages/source/p/pyperf/pyperf-%{version}.tar.gz -Patch0: python38.patch -Patch1: python-retcode.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros -Requires: python-six Recommends: python-psutil BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module mock} BuildRequires: %{python_module psutil} BuildRequires: %{python_module pytest} -BuildRequires: %{python_module six} -BuildRequires: python2-contextlib2 -BuildRequires: python2-statistics -BuildRequires: python2-unittest2 # /SECTION -%ifpython2 -Requires: python2-contextlib2 -Requires: python2-statistics -%endif %python_subpackages %description @@ -52,7 +42,6 @@ Python module to run and analyze benchmarks. %prep %setup -q -n pyperf-%{version} -%autopatch -p1 %build %python_build diff --git a/python-retcode.patch b/python-retcode.patch deleted file mode 100644 index 5d8f6cd..0000000 --- a/python-retcode.patch +++ /dev/null @@ -1,15 +0,0 @@ -Index: pyperf-1.7.0/pyperf/tests/test_system.py -=================================================================== ---- pyperf-1.7.0.orig/pyperf/tests/test_system.py -+++ pyperf-1.7.0/pyperf/tests/test_system.py -@@ -18,7 +18,9 @@ class SystemTests(unittest.TestCase): - - # The return code is either 0 if the system is tuned or 2 if the - # system isn't -- self.assertIn(proc.returncode, (0, 2), msg=proc) -+ # Also it can return 1 if /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor -+ # is not available -+ self.assertIn(proc.returncode, (0, 1, 2), msg=proc) - - - if __name__ == "__main__": diff --git a/python38.patch b/python38.patch deleted file mode 100644 index d09525b..0000000 --- a/python38.patch +++ /dev/null @@ -1,14 +0,0 @@ -Index: pyperf-1.7.0/pyperf/_collect_metadata.py -=================================================================== ---- pyperf-1.7.0.orig/pyperf/_collect_metadata.py -+++ pyperf-1.7.0/pyperf/_collect_metadata.py -@@ -92,7 +92,8 @@ def collect_python_metadata(metadata): - metadata['timer'] = ('%s, resolution: %s' - % (info.implementation, - format_timedelta(info.resolution))) -- elif pyperf.perf_counter == time.clock: -+ elif (hasattr(time, 'clock') -+ and pyperf.perf_counter == time.clock): - metadata['timer'] = 'time.clock()' - elif pyperf.perf_counter == time.time: - metadata['timer'] = 'time.time()'