From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C69C913835A for ; Sun, 31 May 2020 09:44:23 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F3B26E0934; Sun, 31 May 2020 09:44:22 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D054CE0934 for ; Sun, 31 May 2020 09:44:22 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 05C0834F004 for ; Sun, 31 May 2020 09:44:20 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 164381F9 for ; Sun, 31 May 2020 09:44:18 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1590918248.d8b0e7c0e5c4d7c2a26f70492c959d2b910eb3b7.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/distcc/files/, sys-devel/distcc/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-devel/distcc/distcc-3.3.3-r1.ebuild sys-devel/distcc/files/distcc-3.3.3-py38.patch X-VCS-Directories: sys-devel/distcc/files/ sys-devel/distcc/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: d8b0e7c0e5c4d7c2a26f70492c959d2b910eb3b7 X-VCS-Branch: master Date: Sun, 31 May 2020 09:44:18 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: e83bde84-6c02-47df-b578-cf9a32a50d47 X-Archives-Hash: 08ad3353deccc367c8b83d7596f40470 commit: d8b0e7c0e5c4d7c2a26f70492c959d2b910eb3b7 Author: Michał Górny gentoo org> AuthorDate: Sun May 31 09:33:12 2020 +0000 Commit: Michał Górny gentoo org> CommitDate: Sun May 31 09:44:08 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d8b0e7c0 sys-devel/distcc: Port to py38&39 Signed-off-by: Michał Górny gentoo.org> sys-devel/distcc/distcc-3.3.3-r1.ebuild | 4 +- sys-devel/distcc/files/distcc-3.3.3-py38.patch | 53 ++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 1 deletion(-) diff --git a/sys-devel/distcc/distcc-3.3.3-r1.ebuild b/sys-devel/distcc/distcc-3.3.3-r1.ebuild index d7992e1b301..3ab5ecab6d3 100644 --- a/sys-devel/distcc/distcc-3.3.3-r1.ebuild +++ b/sys-devel/distcc/distcc-3.3.3-r1.ebuild @@ -3,7 +3,7 @@ EAPI=6 -PYTHON_COMPAT=( python3_{6,7} ) +PYTHON_COMPAT=( python3_{6,7,8,9} ) inherit autotools flag-o-matic python-single-r1 systemd \ toolchain-funcs user xdg-utils prefix @@ -53,6 +53,8 @@ src_prepare() { eapply "${FILESDIR}/${PN}-3.3.2-freedesktop.patch" # SOCKSv5 support needed for Portage, bug #537616 eapply "${FILESDIR}/${PN}-3.2_rc1-socks5.patch" + # backport py3.8 fixes + eapply "${FILESDIR}/${P}-py38.patch" eapply_user # Bugs #120001, #167844 and probably more. See patch for description. diff --git a/sys-devel/distcc/files/distcc-3.3.3-py38.patch b/sys-devel/distcc/files/distcc-3.3.3-py38.patch new file mode 100644 index 00000000000..1ba5fee7d87 --- /dev/null +++ b/sys-devel/distcc/files/distcc-3.3.3-py38.patch @@ -0,0 +1,53 @@ +From c52a023b8a17e4346c66a8fddee69b40b327eae7 Mon Sep 17 00:00:00 2001 +From: MartB +Date: Thu, 28 Nov 2019 21:00:59 +0100 +Subject: [PATCH] Replace time.clock() with time.perf_counter() + +.clock() got removed in python 3.8 and was marked as deprecated since 3.3 +(https://github.com/python/cpython/pull/13270) +--- + include_server/parse_file.py | 4 ++-- + include_server/statistics.py | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/include_server/parse_file.py b/include_server/parse_file.py +index d1dcc74..f5d78b7 100755 +--- a/include_server/parse_file.py ++++ b/include_server/parse_file.py +@@ -272,7 +272,7 @@ def Parse(self, filepath, symbol_table): + + assert isinstance(filepath, str) + self.filepath = filepath +- parse_file_start_time = time.clock() ++ parse_file_start_time = time.perf_counter() + statistics.parse_file_counter += 1 + + includepath_map_index = self.includepath_map.Index +@@ -338,6 +338,6 @@ def Parse(self, filepath, symbol_table): + expr_includes, next_includes) + + +- statistics.parse_file_total_time += time.clock() - parse_file_start_time ++ statistics.parse_file_total_time += time.perf_counter() - parse_file_start_time + + return (quote_includes, angle_includes, expr_includes, next_includes) +diff --git a/include_server/statistics.py b/include_server/statistics.py +index 9677af3..7bc9cb8 100755 +--- a/include_server/statistics.py ++++ b/include_server/statistics.py +@@ -62,13 +62,13 @@ def StartTiming(): + global start_time, translation_unit_counter + """Mark the start of a request to find an include closure.""" + translation_unit_counter += 1 +- start_time = time.clock() ++ start_time = time.perf_counter() + + + def EndTiming(): + """Mark the end of an include closure calculation.""" + global translation_unit_time, min_time, max_time, total_time +- translation_unit_time = time.clock() - start_time ++ translation_unit_time = time.perf_counter() - start_time + min_time = min(translation_unit_time, min_time) + max_time = max(translation_unit_time, max_time) + total_time += translation_unit_time