security/nyx: fix runtime with python 3.11

switch to pep517 while here

taken from upstream commit:
https://github.com/torproject/nyx/commit/dcaddf2ab

PR:		281337
Reported by:	mdw
Approved by:	maintainer timeout
This commit is contained in:
Ruslan Makhmatkhanov 2024-11-18 10:22:56 +03:00
parent cb669bdbc1
commit 14bfcede4d
3 changed files with 26 additions and 2 deletions

View file

@ -1,6 +1,6 @@
PORTNAME= nyx
PORTVERSION= 2.1.0
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= security net
MASTER_SITES= PYPI
@ -11,11 +11,13 @@ WWW= https://nyx.torproject.org/
LICENSE= GPLv3
LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools>=0:devel/py-setuptools@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR}
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}stem>=1.7.1:security/py-stem@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR}
USES= python
USE_PYTHON= distutils autoplist noflavors
USE_PYTHON= autoplist noflavors pep517
NO_ARCH= yes

View file

@ -0,0 +1,11 @@
--- nyx/panel/__init__.py.orig 2024-11-18 07:13:38 UTC
+++ nyx/panel/__init__.py
@@ -78,7 +78,7 @@ class KeyHandler(collections.namedtuple('Help', ['key'
is_match = self._key_func(key) if self._key_func else key.match(self.key)
if is_match:
- if inspect.getargspec(self._action).args == ['key']:
+ if inspect.getfullargspec(self._action).args == ['key']:
self._action(key)
else:
self._action()

View file

@ -0,0 +1,11 @@
--- test/__init__.py.orig 2024-11-18 07:14:15 UTC
+++ test/__init__.py
@@ -94,7 +94,7 @@ def render(func, *args, **kwargs):
nyx.curses.CURSES_SCREEN.erase()
start_time = time.time()
- func_args = inspect.getargspec(func).args
+ func_args = inspect.getfullargspec(func).args
if func_args[:1] == ['subwindow'] or func_args[:2] == ['self', 'subwindow']:
def _draw(subwindow):