Skip to content

Commit

Permalink
games-util/nml: fix python3.8 support
Browse files Browse the repository at this point in the history
Bug: https://bugs.gentoo.org/737952
Package-Manager: Portage-3.0.1, Repoman-2.3.23
Signed-off-by: Conrad Kostecki <[email protected]>
  • Loading branch information
ConiKost committed Aug 19, 2020
1 parent be9a4a4 commit 51fc11f
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
37 changes: 37 additions & 0 deletions games-util/nml/files/nml-0.4.5-python38.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
From 5b8764c3c4079941fab7be8d9086c38a88ae09ba Mon Sep 17 00:00:00 2001
From: glx22 <[email protected]>
Date: Sun, 20 Oct 2019 11:05:25 +0200
Subject: [PATCH] Fix #52: time.clock() has been removed in python 3.8 (#53)

---
nml/generic.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/nml/generic.py b/nml/generic.py
index ce064b6c..8ee602f1 100644
--- a/nml/generic.py
+++ b/nml/generic.py
@@ -295,7 +295,7 @@ def clear_progress():
hide_progress()

if (progress_message is not None) and (verbosity_level >= VERBOSITY_TIMING):
- print("{} {:.1f} s".format(progress_message, time.clock() - progress_start_time))
+ print("{} {:.1f} s".format(progress_message, time.process_time() - progress_start_time))

progress_message = None
progress_start_time = None
@@ -324,12 +324,12 @@ def print_progress(msg, incremental = False):
progress_message = msg

if incremental:
- t = time.clock()
+ t = time.process_time()
if (progress_update_time is not None) and (t - progress_update_time < 1):
return
progress_update_time = t
else:
- progress_start_time = time.clock()
+ progress_start_time = time.process_time()

print_eol(msg)

1 change: 1 addition & 0 deletions games-util/nml/nml-0.4.5-r2.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-0.4.4-pillow3.patch
"${FILESDIR}"/${PN}-0.4.5-pillow6.patch
"${FILESDIR}"/${PN}-0.4.5-pillow7.patch
"${FILESDIR}"/${PN}-0.4.5-python38.patch
)

src_install() {
Expand Down

0 comments on commit 51fc11f

Please sign in to comment.