Skip to content

Commit

Permalink
games-misc/ponysay: add Python 3.8, 3.9
Browse files Browse the repository at this point in the history
Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Sam James <[email protected]>
  • Loading branch information
thesamesam committed Jan 12, 2021
1 parent 7bb5f11 commit e24828d
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 2 deletions.
38 changes: 38 additions & 0 deletions games-misc/ponysay/files/ponysay-3.0.3-python-syntax.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
https://github.com/erkin/ponysay/commit/f9154fd806bbf31c79b1769b13d5aa1b67f9c06a.patch
(and an additional fix)

From f9154fd806bbf31c79b1769b13d5aa1b67f9c06a Mon Sep 17 00:00:00 2001
From: adasiko <[email protected]>
Date: Sun, 22 Mar 2020 19:33:28 +0700
Subject: [PATCH] fix: do not compare literal with "is not"

---
src/ponysaytool.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/ponysaytool.py b/src/ponysaytool.py
index 7f9a4da5..574a2baa 100755
--- a/src/ponysaytool.py
+++ b/src/ponysaytool.py
@@ -1002,7 +1002,7 @@ def alert(text):
for row in range(0, len(datalines)):
current = leftlines[row]
if len(datalines[row].strip()) == 0:
- if current is not 'comment':
+ if current != 'comment':
if current != last:
self.datamap[current] = None
continue
diff --git a/src/backend.py b/src/backend.py
index 2cc539a..82ff149 100755
--- a/src/backend.py
+++ b/src/backend.py
@@ -291,7 +291,7 @@ class Backend():
props = dollar[7:]
if len(props) > 0:
if ',' in props:
- if props[0] is not ',':
+ if props[0] != ',':
w = props[:props.index(',')]
h = int(props[props.index(',') + 1:])
else:
8 changes: 6 additions & 2 deletions games-misc/ponysay/ponysay-3.0.3.ebuild
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Copyright 1999-2020 Gentoo Authors
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

PYTHON_COMPAT=( python3_{6,7} )
PYTHON_COMPAT=( python3_{6,7,8,9} )
inherit bash-completion-r1 python-single-r1

DESCRIPTION="cowsay reimplemention for ponies"
Expand All @@ -22,6 +22,10 @@ RDEPEND="${PYTHON_DEPS}
fish-completion? ( app-shells/fish )
zsh-completion? ( app-shells/zsh )"

PATCHES=(
"${FILESDIR}/${PN}-3.0.3-python-syntax.patch"
)

setup_py() {
"${PYTHON}" setup.py \
--prefix="${EPREFIX}"/usr \
Expand Down

0 comments on commit e24828d

Please sign in to comment.