testing/sc-controller: rebuild against python 3.12 and fix tests

This commit is contained in:
Joshua Murphy 2024-06-17 12:46:23 -04:00 committed by Celeste
parent 54a5fb8c0b
commit 2d95b56fdd
2 changed files with 17 additions and 2 deletions

View File

@ -2,7 +2,7 @@
# Maintainer: Joshua Murphy <joshuamurphy@posteo.net>
pkgname=sc-controller
pkgver=0.4.8.13
pkgrel=0
pkgrel=1
pkgdesc="User-mode driver and GTK3 based GUI for the Steam Controller"
url="https://github.com/Ryochan7/sc-controller"
# s390x: py3-vdf
@ -29,7 +29,8 @@ makedepends="
"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/Ryochan7/sc-controller/archive/v$pkgver.tar.gz"
source="$pkgname-$pkgver.tar.gz::https://github.com/Ryochan7/sc-controller/archive/v$pkgver.tar.gz
fix-tests.patch"
build() {
gpep517 build-wheel \
@ -50,4 +51,5 @@ package() {
sha512sums="
f0220a409b3b312d73bbebec8128d8a5871f4a97a53d5d98034a9d2e31ce9f93c3b5d01e87c6d4bf8dea6ad96ffb53bddacfe490dc5068159275cfe6b8313e80 sc-controller-0.4.8.13.tar.gz
3791d2f3dbf1d59427e76765196d12f39f763dc2ac57b71ad200e44dc9c5d9e01e9f1893ac2f36f5899048dc5443ade1a75ad4dd825bc965c69f719a1185cc25 fix-tests.patch
"

View File

@ -0,0 +1,13 @@
diff --git a/scc/parser.py b/scc/parser.py
index 78633f0e..4dcf3fa3 100644
--- a/scc/parser.py
+++ b/scc/parser.py
@@ -109,7 +109,7 @@ class ActionParser(object):
ActionParser.Token(type, string)
for type, string, *_
in generate_tokens( iter([s]).__next__ )
- if type != TokenType.ENDMARKER
+ if type != TokenType.ENDMARKER and string != ''
]
except TokenError:
self.tokens = None