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 B38B813835A for ; Sun, 21 Jun 2020 12:37:47 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F0D12E07F2; Sun, 21 Jun 2020 12:37:46 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (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 C51C2E07F2 for ; Sun, 21 Jun 2020 12:37:46 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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 5870034FB3E for ; Sun, 21 Jun 2020 12:37:45 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A06E328E for ; Sun, 21 Jun 2020 12:37:43 +0000 (UTC) From: "Ulrich Müller" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ulrich Müller" Message-ID: <1592742920.5a9f03995769cfd967bed5fd4f018ca16e6fe430.ulm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: games-board/scid/files/, games-board/scid/ X-VCS-Repository: repo/gentoo X-VCS-Files: games-board/scid/files/scid-4.6.2-pgnfix-python3.patch games-board/scid/scid-4.6.2-r1.ebuild X-VCS-Directories: games-board/scid/ games-board/scid/files/ X-VCS-Committer: ulm X-VCS-Committer-Name: Ulrich Müller X-VCS-Revision: 5a9f03995769cfd967bed5fd4f018ca16e6fe430 X-VCS-Branch: master Date: Sun, 21 Jun 2020 12:37:43 +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: 7048bd9e-77f7-4c31-8469-da0e0b43c932 X-Archives-Hash: 039e85da431a04a82806354cf05a9f06 commit: 5a9f03995769cfd967bed5fd4f018ca16e6fe430 Author: Ulrich Müller gentoo org> AuthorDate: Sat Jun 20 09:23:28 2020 +0000 Commit: Ulrich Müller gentoo org> CommitDate: Sun Jun 21 12:35:20 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5a9f0399 games-board/scid: Make pgnfix script work with Python 3. Closes: https://bugs.gentoo.org/728876 Package-Manager: Portage-2.3.101, Repoman-2.3.22 Signed-off-by: Ulrich Müller gentoo.org> .../scid/files/scid-4.6.2-pgnfix-python3.patch | 97 ++++++++++++++++++++++ games-board/scid/scid-4.6.2-r1.ebuild | 5 +- 2 files changed, 100 insertions(+), 2 deletions(-) diff --git a/games-board/scid/files/scid-4.6.2-pgnfix-python3.patch b/games-board/scid/files/scid-4.6.2-pgnfix-python3.patch new file mode 100644 index 00000000000..79b64e5ef6f --- /dev/null +++ b/games-board/scid/files/scid-4.6.2-pgnfix-python3.patch @@ -0,0 +1,97 @@ +--- a/scripts/pgnfix.py ++++ b/scripts/pgnfix.py +@@ -12,7 +12,6 @@ + # put in the Site or Event field, and move them to the Date field. + + import sys +-import string + import re + + if len(sys.argv) < 2: +@@ -69,16 +68,16 @@ + if match: + full = match.group(0) + last, first = match.groups() +- first = string.strip(first) +- full = string.strip(full) +- last = string.strip(last) ++ first = str.strip(first) ++ full = str.strip(full) ++ last = str.strip(last) + if first: + for name in (full, last, + last + " " + first, + last + ", " + first[0], + last + " " + first[0]): +- name = string.lower(name) +- if spelling.has_key(name): ++ name = str.lower(name) ++ if name in spelling: + del spelling[name] + else: + spelling[name] = full +@@ -107,16 +106,16 @@ + if error: + out = sys.stderr + error = 0 +- out.write(string.join(current, "")) ++ out.write("".join(current)) + current = [] + bad_lines = [] + else: + if headers: + for field, value in specials.items(): +- if not headers.has_key(field): ++ if not field in headers: + headers[field] = value + for field in order: +- if headers.has_key(field): ++ if field in headers: + current.append('[%s "%s"]\n' % (field, headers[field])) + del headers[field] + for field, value in headers.items(): +@@ -172,7 +171,7 @@ + specials["Date"] = "%04d.%02d.%02d" % (year, month, day) + value = re.sub("\(?([0-9]+)/([0-9]+)/([0-9]+)\)?", "", value) + +- value = string.strip(value) ++ value = str.strip(value) + + if field in ("White", "Black"): + name = re.sub("[MW][0-9]{5}", "", value) +@@ -193,21 +192,21 @@ + name = re.sub("_", " ", name) + name = re.sub("\.", "", name) + name = re.sub("([A-Za-z])([0-9])", "\\1 \\2", name) +- name = string.strip(name) ++ name = str.strip(name) + name = re.sub("^([A-Z]+?)\s*([A-Z][a-z].+)", "\\2, \\1", + name) + + name = re.sub(",\s*([GI]M)?$", "", name) + +- name = string.strip(name) +- t = string.lower(name) ++ name = str.strip(name) ++ t = str.lower(name) + +- if spelling.has_key(t): ++ if t in spelling: + name = spelling[t] + + headers[field] = name + +- elif not bogus.has_key(field) or not re.search(bogus[field], value): ++ elif not field in bogus or not re.search(bogus[field], value): + headers[field] = value + + if current: +@@ -215,7 +214,7 @@ + if error: + out = sys.stderr + error = 0 +- out.write(string.join(current, "")) ++ out.write("".join(current)) + current = [] + bad_lines = [] + diff --git a/games-board/scid/scid-4.6.2-r1.ebuild b/games-board/scid/scid-4.6.2-r1.ebuild index f31b6be08e8..9a9a52b97b9 100644 --- a/games-board/scid/scid-4.6.2-r1.ebuild +++ b/games-board/scid/scid-4.6.2-r1.ebuild @@ -1,8 +1,8 @@ -# Copyright 1999-2016 Gentoo Foundation +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 -PYTHON_COMPAT=( python2_7 ) +PYTHON_COMPAT=( python3_{6,7,8} ) inherit eutils toolchain-funcs gnome2-utils python-any-r1 DESCRIPTION="a free chess database application" @@ -38,6 +38,7 @@ src_unpack() { PATCHES=( "${FILESDIR}"/${P}-gentoo.patch + "${FILESDIR}"/${P}-pgnfix-python3.patch ) src_prepare() {