forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
games-util/sc-controller: Bump to 0.4.8.15, drop old 0.4.8.11
There is a new upstream (again). Closes: https://bugs.gentoo.org/929599 Signed-off-by: James Le Cuirot <[email protected]>
- Loading branch information
Showing
4 changed files
with
98 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
DIST sc-controller-0.4.8.11.tar.gz 2566642 BLAKE2B 64e910e27ceb93938d6250ae058a5df102922f36f4e1e7aa5d2f761b93bbcf34296eefabb10145b4e1b7030c05af341ccb6cbe01df7ce891c69f8d8fceefdb30 SHA512 e591e1c44763c38a18f09f8d5d9fcdb7f46c60d8f4dc040d82e48617d0f960abb6ec608188724838060dbe532589453b0be2c1d94686decef657205f8e8efcec | ||
DIST sc-controller-0.4.8.15.tar.gz 2570427 BLAKE2B 23fe2de5557457162fccd3c88c5bc15149229ccfee2d6b473d93ddd0e747d8700a2454d32db753293bc70a95aab43d1959e93bc34f1a153b152aa9fbc1d73676 SHA512 a9b38270aaf761e0a62b690d64c64e07539292ffe7d724a31b7989afdacbf64dc1074805d34f07dfe0767cf5bdfc14e5000050782f310ea7f439f5f2af9faf07 |
89 changes: 89 additions & 0 deletions
89
games-util/sc-controller/files/sc-controller-0.4.8.15-py12.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
From 51dda4b98aac878bdbf84aa9715f7ecc9802ba1d Mon Sep 17 00:00:00 2001 | ||
From: James Le Cuirot <[email protected]> | ||
Date: Sat, 22 Jun 2024 14:24:01 +0100 | ||
Subject: [PATCH 1/2] Fix parser to handle new non-terminating newline NL token | ||
in Python 3.12 | ||
|
||
--- | ||
scc/parser.py | 12 ++++++------ | ||
1 file changed, 6 insertions(+), 6 deletions(-) | ||
|
||
diff --git a/scc/parser.py b/scc/parser.py | ||
index 78633f0e..9e77de04 100644 | ||
--- a/scc/parser.py | ||
+++ b/scc/parser.py | ||
@@ -136,7 +136,7 @@ class ActionParser(object): | ||
def _parse_parameter(self): | ||
""" Parses single parameter """ | ||
t = self._next_token() | ||
- while t.type == TokenType.NEWLINE or t.value == "\n": | ||
+ while t.type in (TokenType.NL, TokenType.NEWLINE) or t.value == "\n": | ||
if not self._tokens_left(): | ||
raise ParseError("Expected parameter at end of string") | ||
t = self._next_token() | ||
@@ -236,7 +236,7 @@ class ActionParser(object): | ||
parameters.append(self._parse_parameter()) | ||
# Check if next token is either ')' or ',' | ||
t = self._peek_token() | ||
- while t.type == TokenType.NEWLINE or t.value == "\n": | ||
+ while t.type in (TokenType.NL, TokenType.NEWLINE) or t.value == "\n": | ||
self._next_token() | ||
if not self._tokens_left(): | ||
raise ParseError("Expected ',' or end of parameter list after parameter '%s'" % (parameters[-1],)) | ||
@@ -310,8 +310,8 @@ class ActionParser(object): | ||
action1 = self._create_action(action_class, *parameters) | ||
action2 = self._parse_action() | ||
return MultiAction(action1, action2) | ||
- | ||
- if t.type == TokenType.NEWLINE or t.value == "\n": | ||
+ | ||
+ if t.type in (TokenType.NL, TokenType.NEWLINE) or t.value == "\n": | ||
# Newline can be used to join actions instead of 'and' | ||
self._next_token() | ||
if not self._tokens_left(): | ||
@@ -324,11 +324,11 @@ class ActionParser(object): | ||
action1 = self._create_action(action_class, *parameters) | ||
action2 = self._parse_action() | ||
return MultiAction(action1, action2) | ||
- | ||
+ | ||
if t.type == TokenType.OP and t.value == ';': | ||
# Two (or more) actions joined by ';' | ||
self._next_token() | ||
- while self._tokens_left() and self._peek_token().type == TokenType.NEWLINE: | ||
+ while self._tokens_left() and self._peek_token().type in (TokenType.NL, TokenType.NEWLINE): | ||
self._next_token() | ||
if not self._tokens_left(): | ||
# Having ';' at end of string is not actually error | ||
-- | ||
2.45.1 | ||
|
||
|
||
From e8cc68cb17effa413c3ffde2bce5f8dd1798b0c3 Mon Sep 17 00:00:00 2001 | ||
From: James Le Cuirot <[email protected]> | ||
Date: Sat, 22 Jun 2024 14:34:48 +0100 | ||
Subject: [PATCH 2/2] Address Python ast deprecations that will be removed in | ||
3.14 | ||
|
||
--- | ||
scc/cheader.py | 4 ++-- | ||
1 file changed, 2 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/scc/cheader.py b/scc/cheader.py | ||
index d151d637..f84319f1 100644 | ||
--- a/scc/cheader.py | ||
+++ b/scc/cheader.py | ||
@@ -59,8 +59,8 @@ def eval_expr(expr): | ||
""" Eval and expression inside a #define using a suppart of python grammar """ | ||
|
||
def _eval(node): | ||
- if isinstance(node, ast.Num): | ||
- return node.n | ||
+ if isinstance(node, ast.Constant): | ||
+ return node.value | ||
elif isinstance(node, ast.BinOp): | ||
return OPERATORS[type(node.op)](_eval(node.left), _eval(node.right)) | ||
elif isinstance(node, ast.UnaryOp): | ||
-- | ||
2.45.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters