forked from pool/python-pyperf
Accepting request 786877 from home:mcalabkova:branches:devel:languages:python
- 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 OBS-URL: https://build.opensuse.org/request/show/786877 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyperf?expand=0&rev=5
This commit is contained in:
committed by
Git OBS Bridge
parent
0d42012e1b
commit
c00feb8435
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0d214aa65e085d3e4108a36152cb12f7cd0f4e7fda93b5134b43a9687c975786
|
||||
size 174678
|
3
pyperf-2.0.0.tar.gz
Normal file
3
pyperf-2.0.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2189fbc4af08d519f85468e70e32c902eab0f1341b2c41028b94b2832d3169a7
|
||||
size 173007
|
@@ -1,3 +1,14 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 20 12:42:05 UTC 2020 - Marketa Calabkova <mcalabkova@suse.com>
|
||||
|
||||
- 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 <tchvatal@suse.com>
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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__":
|
@@ -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()'
|
Reference in New Issue
Block a user