diff options
author | Essem | 2024-04-02 16:33:44 -0500 |
---|---|---|
committer | Essem | 2024-04-02 16:33:44 -0500 |
commit | 3381dfa946f99c168a7ea01391f7ce28c34c6238 (patch) | |
tree | bd5df35d3736d281dcb09b9566a40534097f49d1 | |
download | aur-3381dfa946f99c168a7ea01391f7ce28c34c6238.tar.gz |
init
-rw-r--r-- | .SRCINFO | 28 | ||||
-rw-r--r-- | .gitignore | 5 | ||||
-rw-r--r-- | PKGBUILD | 50 | ||||
-rw-r--r-- | no-appnope.patch | 63 |
4 files changed, 146 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..086d3f82db86 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,28 @@ +pkgbase = corrscope + pkgdesc = Python program to render wave files into oscilloscope views, featuring advanced correlation-based triggering algorithm + pkgver = 0.9.0 + pkgrel = 1 + url = https://github.com/corrscope/corrscope + arch = any + license = BSD-2-Clause + makedepends = python-build + makedepends = python-installer + makedepends = python-poetry-core + makedepends = python-setuptools + makedepends = python-wheel + depends = python-ruamel-yaml + depends = python-numpy + depends = python-click + depends = python-matplotlib + depends = python-attrs + depends = python-appdirs + depends = python-atomicwrites + depends = python-colorspacious + depends = python-qtpy + depends = python-pyqt6 + source = corrscope-0.9.0.tar.gz::https://github.com/corrscope/corrscope/archive/refs/tags/0.9.0.tar.gz + source = no-appnope.patch + sha256sums = f53d47eed04200df7f4ec16d463f2a3a9be0f3bb867149a77602ace82373a5c0 + sha256sums = 4d85a0c057545e1459b5362ab81a2c953b63c5efd9094d208c0dbef662203636 + +pkgname = corrscope diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..468f57fbea19 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +*.pkg.tar.zst +*.log +pkg/ +src/ +corrscope-*.tar.gz diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..c6f10baa3dc4 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,50 @@ +# Maintainer: Essem <smswessem@gmail.com> + +pkgname=corrscope +pkgver=0.9.0 +pkgrel=1 +pkgdesc="Python program to render wave files into oscilloscope views, featuring advanced correlation-based triggering algorithm" +arch=('any') +url="https://github.com/corrscope/corrscope" +license=('BSD-2-Clause') +depends=( + 'python-ruamel-yaml' + 'python-numpy' + 'python-click' + 'python-matplotlib' + 'python-attrs' + 'python-appdirs' + 'python-atomicwrites' + 'python-colorspacious' + 'python-qtpy' + 'python-pyqt6' +) +makedepends=( + 'python-build' + 'python-installer' + 'python-poetry-core' + 'python-setuptools' + 'python-wheel' +) +source=("$pkgname-$pkgver.tar.gz::https://github.com/corrscope/corrscope/archive/refs/tags/$pkgver.tar.gz" + "no-appnope.patch") +sha256sums=('f53d47eed04200df7f4ec16d463f2a3a9be0f3bb867149a77602ace82373a5c0' + '4d85a0c057545e1459b5362ab81a2c953b63c5efd9094d208c0dbef662203636') + +prepare() { + cd "$pkgname-$pkgver" + patch -p1 < "$srcdir/no-appnope.patch" +} + +build() { + cd "$pkgname-$pkgver" + python -m build --wheel --no-isolation +} + +package() { + cd "$pkgname-$pkgver" + python -m installer --destdir="$pkgdir" dist/*.whl + + mkdir -p "$pkgdir/usr/share/doc" + cp -r docs "$pkgdir/usr/share/doc/corrscope" +} diff --git a/no-appnope.patch b/no-appnope.patch new file mode 100644 index 000000000000..882a4b6b6fb7 --- /dev/null +++ b/no-appnope.patch @@ -0,0 +1,63 @@ +diff --git a/corrscope/corrscope.py b/corrscope/corrscope.py +index d7ced20..a4c63a4 100644 +--- a/corrscope/corrscope.py ++++ b/corrscope/corrscope.py +@@ -195,11 +195,6 @@ class Arguments: + + + def worker_create_renderer(renderer_params: RendererParams, shmem_names: List[str]): +- import appnope +- +- # Disable power saving for renderer processes. +- appnope.nope() +- + global WORKER_RENDERER + global SHMEMS + +diff --git a/corrscope/gui/__init__.py b/corrscope/gui/__init__.py +index bc9b91a..ac22cab 100644 +--- a/corrscope/gui/__init__.py ++++ b/corrscope/gui/__init__.py +@@ -9,7 +9,6 @@ from pathlib import Path + from types import MethodType + from typing import Optional, List, Any, Tuple, Callable, Union, Dict, Sequence, NewType + +-import appnope + import qtpy.QtCore as qc + import qtpy.QtWidgets as qw + import attr +@@ -751,22 +750,21 @@ class CorrJob(qc.QObject): + """Called in separate thread.""" + cfg = self.cfg + arg = self.arg +- with appnope.nope_scope(reason="corrscope preview/render active"): +- try: +- self.corr = CorrScope(cfg, arg) +- self.corr.play() ++ try: ++ self.corr = CorrScope(cfg, arg) ++ self.corr.play() + +- except paths.MissingFFmpegError: +- arg.on_end() +- self.ffmpeg_missing.emit() ++ except paths.MissingFFmpegError: ++ arg.on_end() ++ self.ffmpeg_missing.emit() + +- except Exception as e: +- arg.on_end() +- stack_trace = format_stack_trace(e) +- self.error.emit(stack_trace) ++ except Exception as e: ++ arg.on_end() ++ stack_trace = format_stack_trace(e) ++ self.error.emit(stack_trace) + +- else: +- arg.on_end() ++ else: ++ arg.on_end() + + + class CorrThread(Thread): |