1 |
commit: 51fc11f34550b7a4002669bfca90c52aa9541249 |
2 |
Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Aug 19 15:11:28 2020 +0000 |
4 |
Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Aug 19 15:14:27 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=51fc11f3 |
7 |
|
8 |
games-util/nml: fix python3.8 support |
9 |
|
10 |
Bug: https://bugs.gentoo.org/737952 |
11 |
Package-Manager: Portage-3.0.1, Repoman-2.3.23 |
12 |
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org> |
13 |
|
14 |
games-util/nml/files/nml-0.4.5-python38.patch | 37 +++++++++++++++++++++++++++ |
15 |
games-util/nml/nml-0.4.5-r2.ebuild | 1 + |
16 |
2 files changed, 38 insertions(+) |
17 |
|
18 |
diff --git a/games-util/nml/files/nml-0.4.5-python38.patch b/games-util/nml/files/nml-0.4.5-python38.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..526a2e19f26 |
21 |
--- /dev/null |
22 |
+++ b/games-util/nml/files/nml-0.4.5-python38.patch |
23 |
@@ -0,0 +1,37 @@ |
24 |
+From 5b8764c3c4079941fab7be8d9086c38a88ae09ba Mon Sep 17 00:00:00 2001 |
25 |
+From: glx22 <glx22@××××××××××××××××××××.com> |
26 |
+Date: Sun, 20 Oct 2019 11:05:25 +0200 |
27 |
+Subject: [PATCH] Fix #52: time.clock() has been removed in python 3.8 (#53) |
28 |
+ |
29 |
+--- |
30 |
+ nml/generic.py | 6 +++--- |
31 |
+ 1 file changed, 3 insertions(+), 3 deletions(-) |
32 |
+ |
33 |
+diff --git a/nml/generic.py b/nml/generic.py |
34 |
+index ce064b6c..8ee602f1 100644 |
35 |
+--- a/nml/generic.py |
36 |
++++ b/nml/generic.py |
37 |
+@@ -295,7 +295,7 @@ def clear_progress(): |
38 |
+ hide_progress() |
39 |
+ |
40 |
+ if (progress_message is not None) and (verbosity_level >= VERBOSITY_TIMING): |
41 |
+- print("{} {:.1f} s".format(progress_message, time.clock() - progress_start_time)) |
42 |
++ print("{} {:.1f} s".format(progress_message, time.process_time() - progress_start_time)) |
43 |
+ |
44 |
+ progress_message = None |
45 |
+ progress_start_time = None |
46 |
+@@ -324,12 +324,12 @@ def print_progress(msg, incremental = False): |
47 |
+ progress_message = msg |
48 |
+ |
49 |
+ if incremental: |
50 |
+- t = time.clock() |
51 |
++ t = time.process_time() |
52 |
+ if (progress_update_time is not None) and (t - progress_update_time < 1): |
53 |
+ return |
54 |
+ progress_update_time = t |
55 |
+ else: |
56 |
+- progress_start_time = time.clock() |
57 |
++ progress_start_time = time.process_time() |
58 |
+ |
59 |
+ print_eol(msg) |
60 |
+ |
61 |
|
62 |
diff --git a/games-util/nml/nml-0.4.5-r2.ebuild b/games-util/nml/nml-0.4.5-r2.ebuild |
63 |
index 7627ddc1e89..3588cfc60e8 100644 |
64 |
--- a/games-util/nml/nml-0.4.5-r2.ebuild |
65 |
+++ b/games-util/nml/nml-0.4.5-r2.ebuild |
66 |
@@ -31,6 +31,7 @@ PATCHES=( |
67 |
"${FILESDIR}"/${PN}-0.4.4-pillow3.patch |
68 |
"${FILESDIR}"/${PN}-0.4.5-pillow6.patch |
69 |
"${FILESDIR}"/${PN}-0.4.5-pillow7.patch |
70 |
+ "${FILESDIR}"/${PN}-0.4.5-python38.patch |
71 |
) |
72 |
|
73 |
src_install() { |