forked from pool/python-pyperf
- Add patches to work with py3.8:
* python-retcode.patch * python38.patch - Update to 1.7.0: * metadata: add ``python_compiler`` * Windows: inherit ``SystemDrive`` environment variable by default. * Fix tests on ARM and PPC: cpu_model_name metadata is no longer required on Linux. * tests: Do not allow test suite to execute without unittest2 on Python2, otherwise man failures occur due to missing 'assertRegex'. * doc: Update old/dead links. * Travis CI: drop Python 3.4 support. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyperf?expand=0&rev=3
This commit is contained in:
committed by
Git OBS Bridge
parent
eef4b1dded
commit
0d42012e1b
14
python38.patch
Normal file
14
python38.patch
Normal file
@@ -0,0 +1,14 @@
|
||||
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