* [gentoo-commits] repo/proj/guru:dev commit in: media-sound/corrscope/, media-sound/corrscope/files/
@ 2024-07-19 22:02 Artemis Everfree
0 siblings, 0 replies; 2+ messages in thread
From: Artemis Everfree @ 2024-07-19 22:02 UTC (permalink / raw
To: gentoo-commits
commit: 4faad5f0a66d1e80781f76a356cbf929b16931ba
Author: Artemis Everfree <artemis <AT> artemis <DOT> sh>
AuthorDate: Fri Jul 19 22:01:07 2024 +0000
Commit: Artemis Everfree <artemis <AT> artemis <DOT> sh>
CommitDate: Fri Jul 19 22:01:59 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=4faad5f0
media-sound/corrscope: new package, add 0.10.0
Signed-off-by: Artemis Everfree <artemis <AT> artemis.sh>
media-sound/corrscope/Manifest | 1 +
media-sound/corrscope/corrscope-0.10.0.ebuild | 45 +++++++++++
.../corrscope/files/remove-appnope-dep.patch | 87 ++++++++++++++++++++++
media-sound/corrscope/metadata.xml | 12 +++
4 files changed, 145 insertions(+)
diff --git a/media-sound/corrscope/Manifest b/media-sound/corrscope/Manifest
new file mode 100644
index 000000000..117f80c67
--- /dev/null
+++ b/media-sound/corrscope/Manifest
@@ -0,0 +1 @@
+DIST corrscope-0.10.0.tar.gz 107386 BLAKE2B af3613386ce45917b9701fa2eb3d4857a7ae8b2a0e7452ce03db00493a49ecf3e1d196e0324434261f3f652c64b31036b6bf0f9cf6541a886051445f3d29fb67 SHA512 c403ed4f740d48b720bc521c005708f7c0797fd12d7ebb2a8605f33f2b2ca0e2a7af9e38883437460f32f5515675532b9a6ba49118a8bc21190af8eb070274c2
diff --git a/media-sound/corrscope/corrscope-0.10.0.ebuild b/media-sound/corrscope/corrscope-0.10.0.ebuild
new file mode 100644
index 000000000..ff81597e0
--- /dev/null
+++ b/media-sound/corrscope/corrscope-0.10.0.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+EAPI=8
+
+DISTUTILS_USE_PEP517=poetry
+DISTUTILS_SINGLE_IMPL=1
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="Advanced oscilloscope audio visualizer specializing in chiptune"
+HOMEPAGE="
+ https://pypi.org/project/corrscope/
+ https://corrscope.github.io/corrscope/
+"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64"
+
+RDEPEND="
+ $(python_gen_cond_dep '
+ dev-python/ruamel-yaml[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/click[${PYTHON_USEDEP}]
+ dev-python/matplotlib[${PYTHON_USEDEP}]
+ dev-python/attrs[${PYTHON_USEDEP}]
+ dev-python/appdirs[${PYTHON_USEDEP}]
+ dev-python/atomicwrites[${PYTHON_USEDEP}]
+ dev-python/colorspacious[${PYTHON_USEDEP}]
+ dev-python/QtPy[${PYTHON_USEDEP}]
+ ')
+ media-video/ffmpeg
+"
+
+PATCHES=(
+ # appnope is a library for disabling powersaving on macOS. corrscope
+ # hard-depends on this currently. appnope isn't packaged, and it seems a
+ # bit silly to me to package it for gentoo given its purpose, so I've just
+ # removed the few lines that import/invoke it.
+ #
+ # Ideally, we should upstream a fix that only conditionally imports it,
+ # but I don't know how to do that right now.
+ "${FILESDIR}"/remove-appnope-dep.patch
+)
diff --git a/media-sound/corrscope/files/remove-appnope-dep.patch b/media-sound/corrscope/files/remove-appnope-dep.patch
new file mode 100644
index 000000000..44e96ccfa
--- /dev/null
+++ b/media-sound/corrscope/files/remove-appnope-dep.patch
@@ -0,0 +1,87 @@
+diff --git a/PKG-INFO b/PKG-INFO
+index 59a2ee4..4407908 100644
+--- a/PKG-INFO
++++ b/PKG-INFO
+@@ -21,7 +21,6 @@ Requires-Dist: PyQt5-Qt5 (>=5.15,<5.15.11) ; extra == "qt5"
+ Requires-Dist: PyQt6 (>=6.2,<7.0) ; extra == "qt6"
+ Requires-Dist: QtPy (>=2.0.1,<3.0.0)
+ Requires-Dist: appdirs (>=1.4.4,<2.0.0)
+-Requires-Dist: appnope (>=0.1.3,<0.2.0)
+ Requires-Dist: atomicwrites (>=1.4.0,<2.0.0)
+ Requires-Dist: attrs (>=21.2.0,<22.0.0)
+ Requires-Dist: click (>=8.0.1,<9.0.0)
+diff --git a/corrscope/corrscope.py b/corrscope/corrscope.py
+index 79a6cba..d20b4c4 100644
+--- a/corrscope/corrscope.py
++++ b/corrscope/corrscope.py
+@@ -197,11 +197,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 f983021..afe2993 100644
+--- a/corrscope/gui/__init__.py
++++ b/corrscope/gui/__init__.py
+@@ -10,7 +10,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
+@@ -803,22 +802,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):
+diff --git a/pyproject.toml b/pyproject.toml
+index 9c281ee..59cbe64 100644
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -32,7 +32,6 @@ QtPy = "^2.0.1"
+ PyQt5 = {version = "^5.15", optional = true}
+ PyQt5-Qt5 = {version = "^5.15,<5.15.11", optional = true}
+ PyQt6 = {version = "^6.2", optional = true}
+-appnope = "^0.1.3"
+
+ [tool.poetry.extras]
+ qt5 = ["PyQt5", "PyQt5-Qt5"]
diff --git a/media-sound/corrscope/metadata.xml b/media-sound/corrscope/metadata.xml
new file mode 100644
index 000000000..d907a29b4
--- /dev/null
+++ b/media-sound/corrscope/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>artemis@artemis.sh</email>
+ <name>Artemis Everfree</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="pypi">corrscope</remote-id>
+ <remote-id type="github">corrscope/corrscope</remote-id>
+ </upstream>
+</pkgmetadata>
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/proj/guru:dev commit in: media-sound/corrscope/, media-sound/corrscope/files/
@ 2024-07-24 10:48 Artemis Everfree
0 siblings, 0 replies; 2+ messages in thread
From: Artemis Everfree @ 2024-07-24 10:48 UTC (permalink / raw
To: gentoo-commits
commit: 9c6033ea9ce9c769e9f4a5e23d9919a7a438cf04
Author: Artemis Everfree <artemis <AT> artemis <DOT> sh>
AuthorDate: Wed Jul 24 10:45:28 2024 +0000
Commit: Artemis Everfree <artemis <AT> artemis <DOT> sh>
CommitDate: Wed Jul 24 10:48:00 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=9c6033ea
media-sound/corrscope: fix for numpy 2.x
Signed-off-by: Artemis Everfree <artemis <AT> artemis.sh>
.../{corrscope-0.10.0.ebuild => corrscope-0.10.0-r1.ebuild} | 7 ++++++-
media-sound/corrscope/files/remove-npdeprecate.patch | 12 ++++++++++++
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/media-sound/corrscope/corrscope-0.10.0.ebuild b/media-sound/corrscope/corrscope-0.10.0-r1.ebuild
similarity index 80%
rename from media-sound/corrscope/corrscope-0.10.0.ebuild
rename to media-sound/corrscope/corrscope-0.10.0-r1.ebuild
index ff81597e0..ea666260a 100644
--- a/media-sound/corrscope/corrscope-0.10.0.ebuild
+++ b/media-sound/corrscope/corrscope-0.10.0-r1.ebuild
@@ -4,7 +4,7 @@ EAPI=8
DISTUTILS_USE_PEP517=poetry
DISTUTILS_SINGLE_IMPL=1
-PYTHON_COMPAT=( python3_{10..12} )
+PYTHON_COMPAT=( python3_{10..13} )
inherit distutils-r1 pypi
@@ -42,4 +42,9 @@ PATCHES=(
# Ideally, we should upstream a fix that only conditionally imports it,
# but I don't know how to do that right now.
"${FILESDIR}"/remove-appnope-dep.patch
+
+ # corrscope seems to have copied in a modified scipy file to their source
+ # tree. That file uses np.deprecate, which is removed in numpy2. corrscope
+ # doesn't care about this function being marked deprecated, so neither do we
+ "${FILESDIR}"/remove-npdeprecate.patch
)
diff --git a/media-sound/corrscope/files/remove-npdeprecate.patch b/media-sound/corrscope/files/remove-npdeprecate.patch
new file mode 100644
index 000000000..b165131e3
--- /dev/null
+++ b/media-sound/corrscope/files/remove-npdeprecate.patch
@@ -0,0 +1,12 @@
+diff --git a/corrscope/utils/scipy/windows.py b/corrscope/utils/scipy/windows.py
+index 0eee7f2..8ba1fa4 100644
+--- a/corrscope/utils/scipy/windows.py
++++ b/corrscope/utils/scipy/windows.py
+@@ -816,7 +816,6 @@ def hann(M: int, sym: bool = True) -> np.ndarray:
+ return general_hamming(M, 0.5, sym)
+
+
+-@np.deprecate(new_name='scipy.signal.windows.hann')
+ def hanning(*args, **kwargs):
+ return hann(*args, **kwargs)
+
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-07-24 10:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-19 22:02 [gentoo-commits] repo/proj/guru:dev commit in: media-sound/corrscope/, media-sound/corrscope/files/ Artemis Everfree
-- strict thread matches above, loose matches on Subject: below --
2024-07-24 10:48 Artemis Everfree
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox