diff options
author | Aiden Grossman <agrossman154@yahoo.com> | 2022-05-17 20:54:59 +0000 |
---|---|---|
committer | alice <alice@ayaya.dev> | 2022-05-18 23:40:34 +0000 |
commit | 80e9c75637cd35d51f137a04c13d46e55ee2555f (patch) | |
tree | 073558240808be58aa1999086908edf9e3c47ff2 | |
parent | 9a797cf91ffc319dfc06d4e04c32846404a141e0 (diff) |
community/py3-terminado: upgrade to 0.15.0
-rw-r--r-- | community/py3-terminado/APKBUILD | 14 | ||||
-rw-r--r-- | community/py3-terminado/bash.patch | 111 | ||||
-rw-r--r-- | community/py3-terminado/test_get_pid.patch | 6 |
3 files changed, 21 insertions, 110 deletions
diff --git a/community/py3-terminado/APKBUILD b/community/py3-terminado/APKBUILD index 0c6eb749b42..abca1f2575f 100644 --- a/community/py3-terminado/APKBUILD +++ b/community/py3-terminado/APKBUILD @@ -1,7 +1,7 @@ # Contributor: Aiden Grossman <agrossman154@yahoo.com> # Maintainer: Aiden Grossman <agrossman154@yahoo.com> pkgname=py3-terminado -pkgver=0.13.3 +pkgver=0.15.0 pkgrel=0 pkgdesc="Tornado websocket backend for xterm.js" url="https://github.com/jupyter/terminado" @@ -9,7 +9,7 @@ arch="noarch" license="BSD-2-Clause" depends="py3-ptyprocess py3-tornado" checkdepends="py3-pytest" -makedepends="py3-setuptools" +makedepends="py3-build py3-hatchling py3-installer" source="$pkgname-$pkgver.tar.gz::https://github.com/jupyter/terminado/archive/refs/tags/v$pkgver.tar.gz bash.patch test_get_pid.patch @@ -17,7 +17,7 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/jupyter/terminado/archive/re builddir="$srcdir/terminado-$pkgver/" build() { - python3 setup.py build + python3 -m build --wheel --no-isolation --skip-dependency-check } check() { @@ -25,11 +25,11 @@ check() { } package() { - python3 setup.py install --prefix=/usr --root="$pkgdir" + python3 -m installer --destdir="$pkgdir" dist/*.whl } sha512sums=" -69595fddc23adece80b7debecb489540cc82e81cc9b4880dcf1f06d84c90f5be101704ea000ed04f5ca5cb87df531773c8dd04046b13f942928ab7f7501f4391 py3-terminado-0.13.3.tar.gz -8c4167ea3ab718395670b91613d5881d0a9b1eda09f55934005ca02abb2a9b153c7dd9c962b8917dd1c0cfb2292a754342d87e0637073b48f24c3dee70967189 bash.patch -fad875df5877324e5758c1fd2b8ecd6d43982a9a3c47cb420aa6034f0f39510a16d2486be0b786485003cc0f01067d4713410428f83af6ae0da3b67b4e63c6ca test_get_pid.patch +409803a482e50ad9b8607937306fe2ceb1ef16689d5204605f34ec4c7f82b66552cd63d4d73c35d383edae50848b116b04cf3cb2b572a872cb6ab53189b8a024 py3-terminado-0.15.0.tar.gz +924cf4a77d992a3096780354131800220d776197f88a1cb7347bfd94b3469dc361fb86833f7d2e78829ba5910c8aadc48fbbbec4d9a994f4253712b2c931e757 bash.patch +612260d4c5fb44528cd98b3dbe34df92657442130e26d03b75ee4e416b0faf88047ce3ccbc5301d7a6f175902337835217c36a77f3c6254e26a05822440aabc9 test_get_pid.patch " diff --git a/community/py3-terminado/bash.patch b/community/py3-terminado/bash.patch index 83a56f559db..227f4eeff1a 100644 --- a/community/py3-terminado/bash.patch +++ b/community/py3-terminado/bash.patch @@ -1,109 +1,20 @@ -diff --git a/README.rst b/README.rst -index 4803b8c..4c23567 100644 ---- a/README.rst -+++ b/README.rst -@@ -47,7 +47,7 @@ Usage example: - ws_url_path="/websocket") - - if __name__ == '__main__': -- term_manager = terminado.SingleTermManager(shell_command=['bash']) -+ term_manager = terminado.SingleTermManager(shell_command=['sh']) - handlers = [ - (r"/websocket", terminado.TermSocket, - {'term_manager': term_manager}), -diff --git a/demos/named.py b/demos/named.py -index a3703f2..911fe71 100755 ---- a/demos/named.py -+++ b/demos/named.py -@@ -30,7 +30,7 @@ class NewTerminalHandler(tornado.web.RequestHandler): - self.redirect("/" + name, permanent=False) - - def main(): -- term_manager = NamedTermManager(shell_command=['bash'], -+ term_manager = NamedTermManager(shell_command=['sh'], - max_terminals=100) - - handlers = [ -diff --git a/demos/single.py b/demos/single.py -index e63f469..9452828 100755 ---- a/demos/single.py -+++ b/demos/single.py -@@ -14,7 +14,7 @@ class TerminalPageHandler(tornado.web.RequestHandler): - ws_url_path="/websocket") - - def main(argv): -- term_manager = SingleTermManager(shell_command=['bash']) -+ term_manager = SingleTermManager(shell_command=['sh']) - handlers = [ - (r"/websocket", TermSocket, - {'term_manager': term_manager}), -diff --git a/demos/uimod.py b/demos/uimod.py -index 26adcc2..cfb0875 100644 ---- a/demos/uimod.py -+++ b/demos/uimod.py -@@ -15,7 +15,7 @@ class TerminalPageHandler(tornado.web.RequestHandler): - ws_url_path="/websocket") - - def main(argv): -- term_manager = SingleTermManager(shell_command=['bash']) -+ term_manager = SingleTermManager(shell_command=['sh']) - handlers = [ - (r"/websocket", TermSocket, - {'term_manager': term_manager}), -diff --git a/demos/unique.py b/demos/unique.py -index 71bd85c..577981c 100755 ---- a/demos/unique.py -+++ b/demos/unique.py -@@ -14,7 +14,7 @@ class TerminalPageHandler(tornado.web.RequestHandler): - ws_url_path="/websocket") - - def main(argv): -- term_manager = UniqueTermManager(shell_command=['bash']) -+ term_manager = UniqueTermManager(shell_command=['sh']) - handlers = [ - (r"/websocket", TermSocket, - {'term_manager': term_manager}), -diff --git a/doc/websocket.rst b/doc/websocket.rst -index 7f429c4..1c9e511 100644 ---- a/doc/websocket.rst -+++ b/doc/websocket.rst -@@ -9,7 +9,7 @@ any other:: - app = tornado.web.Application([ - # ... other handlers ... - (r"/websocket", terminado.TermSocket, -- {'term_manager': terminado.SingleTermManager(shell_command=['bash'])}), -+ {'term_manager': terminado.SingleTermManager(shell_command=['sh'])}), - ], **kwargs) - - Now, a page in your application can connect to ``ws://<host>/websocket``. Using -@@ -22,7 +22,7 @@ Now, a page in your application can connect to ``ws://<host>/websocket``. Using - .. warning:: - - :class:`~terminado.TermSocket` does not authenticate the connection at all, -- and using it with a program like ``bash`` means that anyone who can connect -+ and using it with a program like ``sh`` means that anyone who can connect - to it can run commands on your server. It is up to you to integrate the - handler with whatever authentication system your application uses. For - instance, in IPython, we subclass it like this:: -diff --git a/terminado/tests/basic_test.py b/terminado/tests/basic_test.py -index 0f62cd6..540e4b3 100644 ---- a/terminado/tests/basic_test.py -+++ b/terminado/tests/basic_test.py -@@ -140,14 +140,14 @@ class TermTestCase(tornado.testing.AsyncHTTPTestCase): +--- ./terminado/tests/basic_test.py.orig ++++ ./terminado/tests/basic_test.py +@@ -139,14 +139,14 @@ def get_app(self):
self.named_tm = NamedTermManager(
-- shell_command=['bash'],
-+ shell_command=['sh'],
+- shell_command=["bash"],
++ shell_command=["sh"],
max_terminals=MAX_TERMS,
)
-
-- self.single_tm = SingleTermManager(shell_command=['bash'])
-+ self.single_tm = SingleTermManager(shell_command=['sh'])
-
+
+- self.single_tm = SingleTermManager(shell_command=["bash"])
++ self.single_tm = SingleTermManager(shell_command=["sh"])
+
self.unique_tm = UniqueTermManager(
-- shell_command=['bash'],
-+ shell_command=['sh'],
+- shell_command=["bash"],
++ shell_command=["sh"],
max_terminals=MAX_TERMS,
)
diff --git a/community/py3-terminado/test_get_pid.patch b/community/py3-terminado/test_get_pid.patch index ddc7820bb70..4e61560a859 100644 --- a/community/py3-terminado/test_get_pid.patch +++ b/community/py3-terminado/test_get_pid.patch @@ -1,10 +1,10 @@ --- ./terminado/tests/basic_test.py.orig +++ ./terminado/tests/basic_test.py -@@ -93,7 +93,7 @@ - match = re.search(r'echo \$\$\\.*?\\r\\n(\d+)', repr(stdout))
+@@ -98,7 +98,7 @@ + assert match is not None
pid = int(match.groups()[0])
else:
-- pid = int(stdout.split('\n')[1])
+- pid = int(stdout.split("\n")[1])
+ pid = int(re.findall("[0-9]{1,9}", stdout)[0])
return pid
|