diff options
author | Claudia Pellegrino | 2023-07-20 09:41:27 +0200 |
---|---|---|
committer | Claudia Pellegrino | 2023-07-21 20:15:52 +0200 |
commit | 456c29070766793f46b1db9e0051db1578fc75bd (patch) | |
tree | be7af6a65ebb52f1f2cad1c6640dbd7742d89d5a | |
parent | 6ba48b5197ad1130ea4fac121a868a2d03c008e0 (diff) | |
download | aur-456c29070766793f46b1db9e0051db1578fc75bd.tar.gz |
spleeter v2.4.0
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | PKGBUILD | 35 | ||||
-rw-r--r-- | github-pr-808-rebased-2.3.0.patch | 40 | ||||
-rw-r--r-- | github-pr-808-rebased-2.4.0.patch | 168 | ||||
-rw-r--r-- | str-enum-python311.patch | 15 | ||||
-rw-r--r-- | test-eval-xfail.patch | 36 |
6 files changed, 200 insertions, 111 deletions
@@ -1,6 +1,6 @@ pkgbase = spleeter pkgdesc = Deezer music source separation library and tool using pretrained models - pkgver = 2.3.2 + pkgver = 2.4.0 pkgrel = 1 url = https://github.com/deezer/spleeter arch = any @@ -15,23 +15,20 @@ pkgbase = spleeter depends = python-ffmpeg-python depends = python-h2 depends = python-httpx - depends = python-librosa depends = python-museval depends = python-norbert depends = python-tensorflow depends = python-typer - depends = python-lazy-loader - depends = python-soxr optdepends = libsndfile: to perform evaluation - source = spleeter-2.3.2.tar.gz::https://github.com/deezer/spleeter/archive/bdc27726412dd296ae9d51434db402675565d129.tar.gz - source = github-pr-808-rebased-2.3.0.patch + source = spleeter-2.4.0.tar.gz::https://github.com/deezer/spleeter/archive/0b26dec9f03685117a3a78dc1c4ba1ac7d2d6980.tar.gz + source = github-pr-808-rebased-2.4.0.patch source = fix-stray-license.patch source = str-enum-python311.patch source = test-eval-xfail.patch - sha512sums = 254cfdd3379f766103aba02d6783eea634681841d01fc94d65dba7c7b996d9ec441ee8185011a3bf567e02e04c1ef7c89e50a666b37b79c6053dc1104fbd53a8 - sha512sums = f573e211ca884948abf1d9f962a4d4f7e10609d3e7b714d0dde5326c6d1041ff83df26631c47e983cec962e44b2a2a2e964320d3d3d8d1d78811db991327a2f4 + sha512sums = 9301d1e2e5c6eb547dfe95db84692b20db252a51ece90c9f11b951933ae770fb9ff936e6857f8c6fe8e46128b2388c2f30fb1fd470e077adedc49fb9c62810d4 + sha512sums = 0e5a19178f85b9d456db1a43fe54010ce25070626e8324d45beae77fe14703c975ea81280c96d791cb54ab648c2bab3bff8cad63dc368d0f86a00392ab97d9c7 sha512sums = 2a54b0b27c60db02bef64195737970a8fcde9a7a79576aa1a01b8e46ba7f40d3d1d0ae02d739f2e63475a10c663ce437fbbcbcaa52b397d33b82e68d8218df85 - sha512sums = 8e84da04d5c19d6fe13fc469c4e8e2d1246ad3eb734b6b65f690c7f85acbd8d2c71121ddb983b3a332a6d7eb4c2e289a445ac9364a9e681900c9b7dce572a4a1 - sha512sums = cdf7b1b499dc5877af2e5f0a13659fb9a2e45795743e757f7b521f7d4267cfa527f7905e749525fbd960ca5e7cfaeae2bcacfc33cf08a74049ba78e824328d9e + sha512sums = bb0605e24ea452ff37c4fe650ed1680439301a4d341e6f514b65cf20946e3fe013a8e07d6263c9640ee370f79c5dab642c555777ea6090defe143acf0333f65e + sha512sums = 891fc4bcf8f93d53e99e9a5d339b4a5a36349834a737ee0ac07b1a7da3f66813e6ada76164de22548171f47d43d03302b5fa8dcfb92b134bedb302318990ba0b pkgname = spleeter @@ -1,7 +1,7 @@ # Maintainer: Claudia Pellegrino <aur ät cpellegrino.de> pkgname=spleeter -pkgver=2.3.2 +pkgver=2.4.0 # The upstream folks don’t tag Git commits for their PyPi releases. # Requests to tag their releases are left unanswered [1]. @@ -11,9 +11,9 @@ pkgver=2.3.2 # version bump [2] a reasonable approximation for the actual release. # # [1]: https://github.com/deezer/spleeter/issues/845 -# [2]: https://github.com/deezer/spleeter/commit/bdc27726412dd296ae9d51434db402675565d129#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711R3 +# [2]: https://github.com/deezer/spleeter/commit/0b26dec9f03685117a3a78dc1c4ba1ac7d2d6980#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711R3 # -_commit=bdc27726412dd296ae9d51434db402675565d129 +_commit=0b26dec9f03685117a3a78dc1c4ba1ac7d2d6980 pkgrel=1 pkgdesc='Deezer music source separation library and tool using pretrained models' @@ -22,27 +22,16 @@ arch=('any') license=('MIT') depends=( 'python-ffmpeg-python' + # Due to `extras=["https"]`, `python-httpx` requires `python-h2`. + # Ignore the namcap warning `dependency-not-needed python-h2`. 'python-h2' 'python-httpx' - 'python-librosa' 'python-museval' 'python-norbert' 'python-tensorflow' 'python-typer' - - # `python-lazy-loader` and `python-soxr` are transitive - # dependencies, which should have been declared in - # `python-librosa`’s PKGBUILD. - # Declaring them here as a temporary workaround. - # Remove these lines once they’ve been added to `python-librosa`. - 'python-lazy-loader' - 'python-soxr' -) -checkdepends=( - 'python-py' - 'python-pytest' - 'python-pytest-forked' ) +checkdepends=('python-py' 'python-pytest' 'python-pytest-forked') makedepends=( 'python-build' 'python-installer' @@ -52,24 +41,24 @@ makedepends=( optdepends=('libsndfile: to perform evaluation') source=( "${pkgname}-${pkgver}.tar.gz::https://github.com/deezer/spleeter/archive/${_commit}.tar.gz" - 'github-pr-808-rebased-2.3.0.patch' + 'github-pr-808-rebased-2.4.0.patch' 'fix-stray-license.patch' 'str-enum-python311.patch' 'test-eval-xfail.patch' ) sha512sums=( - '254cfdd3379f766103aba02d6783eea634681841d01fc94d65dba7c7b996d9ec441ee8185011a3bf567e02e04c1ef7c89e50a666b37b79c6053dc1104fbd53a8' - 'f573e211ca884948abf1d9f962a4d4f7e10609d3e7b714d0dde5326c6d1041ff83df26631c47e983cec962e44b2a2a2e964320d3d3d8d1d78811db991327a2f4' + '9301d1e2e5c6eb547dfe95db84692b20db252a51ece90c9f11b951933ae770fb9ff936e6857f8c6fe8e46128b2388c2f30fb1fd470e077adedc49fb9c62810d4' + '0e5a19178f85b9d456db1a43fe54010ce25070626e8324d45beae77fe14703c975ea81280c96d791cb54ab648c2bab3bff8cad63dc368d0f86a00392ab97d9c7' '2a54b0b27c60db02bef64195737970a8fcde9a7a79576aa1a01b8e46ba7f40d3d1d0ae02d739f2e63475a10c663ce437fbbcbcaa52b397d33b82e68d8218df85' - '8e84da04d5c19d6fe13fc469c4e8e2d1246ad3eb734b6b65f690c7f85acbd8d2c71121ddb983b3a332a6d7eb4c2e289a445ac9364a9e681900c9b7dce572a4a1' - 'cdf7b1b499dc5877af2e5f0a13659fb9a2e45795743e757f7b521f7d4267cfa527f7905e749525fbd960ca5e7cfaeae2bcacfc33cf08a74049ba78e824328d9e' + 'bb0605e24ea452ff37c4fe650ed1680439301a4d341e6f514b65cf20946e3fe013a8e07d6263c9640ee370f79c5dab642c555777ea6090defe143acf0333f65e' + '891fc4bcf8f93d53e99e9a5d339b4a5a36349834a737ee0ac07b1a7da3f66813e6ada76164de22548171f47d43d03302b5fa8dcfb92b134bedb302318990ba0b' ) prepare() { cd "${srcdir}/${pkgname#python-}-${_commit}" # https://github.com/deezer/spleeter/pull/808 - patch -p1 < "${srcdir}/github-pr-808-rebased-2.3.0.patch" + patch -p1 < "${srcdir}/github-pr-808-rebased-2.4.0.patch" # Keep the build backend from including `LICENSE` in the # `site-packages` folder directly. Upstream PR pending. diff --git a/github-pr-808-rebased-2.3.0.patch b/github-pr-808-rebased-2.3.0.patch deleted file mode 100644 index 219b4691e938..000000000000 --- a/github-pr-808-rebased-2.3.0.patch +++ /dev/null @@ -1,40 +0,0 @@ -From d9eb568ce7abd079ea4459431328e9f87fd7e1cc Mon Sep 17 00:00:00 2001 -From: Claudia Pellegrino <claui@users.noreply.github.com> -Date: Fri, 2 Dec 2022 10:23:26 +0100 -Subject: [PATCH] Fix httpx usage - -Follow redirects when downloading from GitHub via httpx. -Fixes issue #686 [1]. - -[1]: https://github.com/deezer/spleeter/issues/686 - -Reported-by: Antonio Petricca <antonio.petricca@gmail.com> ---- - spleeter/model/provider/github.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/spleeter/model/provider/github.py b/spleeter/model/provider/github.py -index 3a9b190..c020555 100644 ---- a/spleeter/model/provider/github.py -+++ b/spleeter/model/provider/github.py -@@ -114,7 +114,7 @@ class GithubModelProvider(ModelProvider): - self.CHECKSUM_INDEX, - ) - ) -- response: httpx.Response = httpx.get(url) -+ response: httpx.Response = httpx.get(url, follow_redirects=True) - response.raise_for_status() - index: Dict = response.json() - if name not in index: -@@ -137,7 +137,7 @@ class GithubModelProvider(ModelProvider): - url = f"{url}.tar.gz" - logger.info(f"Downloading model archive {url}") - with httpx.Client(http2=True) as client: -- with client.stream("GET", url) as response: -+ with client.stream("GET", url, follow_redirects=True) as response: - response.raise_for_status() - archive = NamedTemporaryFile(delete=False) - try: --- -2.38.1 - diff --git a/github-pr-808-rebased-2.4.0.patch b/github-pr-808-rebased-2.4.0.patch new file mode 100644 index 000000000000..072f6c1c6007 --- /dev/null +++ b/github-pr-808-rebased-2.4.0.patch @@ -0,0 +1,168 @@ +From 70f13dfc8dcb548206469c116b14e89f1177e051 Mon Sep 17 00:00:00 2001 +From: Claudia Pellegrino <claui@users.noreply.github.com> +Date: Fri, 2 Dec 2022 10:23:26 +0100 +Subject: [PATCH] Fix httpx usage + +Follow redirects when downloading from GitHub via httpx. +Fixes issue #686 [1]. + +[1]: https://github.com/deezer/spleeter/issues/686 + +Reported-by: Antonio Petricca <antonio.petricca@gmail.com> +--- + poetry.lock | 42 ++++++++++++++++++------------- + pyproject.toml | 2 +- + spleeter/model/provider/github.py | 4 +-- + 3 files changed, 28 insertions(+), 20 deletions(-) + +diff --git a/poetry.lock b/poetry.lock +index 299bdbf..1abf828 100644 +--- a/poetry.lock ++++ b/poetry.lock +@@ -525,16 +525,19 @@ protobuf = ["grpcio-tools (>=1.51.1)"] + + [[package]] + name = "h11" +-version = "0.12.0" ++version = "0.14.0" + description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" + category = "main" + optional = false +-python-versions = ">=3.6" ++python-versions = ">=3.7" + files = [ +- {file = "h11-0.12.0-py3-none-any.whl", hash = "sha256:36a3cb8c0a032f56e2da7084577878a035d3b61d104230d4bd49c0c6b555a9c6"}, +- {file = "h11-0.12.0.tar.gz", hash = "sha256:47222cb6067e4a307d535814917cd98fd0a57b6788ce715755fa2b6c28b56042"}, ++ {file = "h11-0.14.0-py3-none-any.whl", hash = "sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761"}, ++ {file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"}, + ] + ++[package.dependencies] ++typing-extensions = {version = "*", markers = "python_version < \"3.8\""} ++ + [[package]] + name = "h2" + version = "4.1.0" +@@ -603,47 +606,50 @@ files = [ + + [[package]] + name = "httpcore" +-version = "0.13.7" ++version = "0.16.3" + description = "A minimal low-level HTTP client." + category = "main" + optional = false +-python-versions = ">=3.6" ++python-versions = ">=3.7" + files = [ +- {file = "httpcore-0.13.7-py3-none-any.whl", hash = "sha256:369aa481b014cf046f7067fddd67d00560f2f00426e79569d99cb11245134af0"}, +- {file = "httpcore-0.13.7.tar.gz", hash = "sha256:036f960468759e633574d7c121afba48af6419615d36ab8ede979f1ad6276fa3"}, ++ {file = "httpcore-0.16.3-py3-none-any.whl", hash = "sha256:da1fb708784a938aa084bde4feb8317056c55037247c787bd7e19eb2c2949dc0"}, ++ {file = "httpcore-0.16.3.tar.gz", hash = "sha256:c5d6f04e2fc530f39e0c077e6a30caa53f1451096120f1f38b954afd0b17c0cb"}, + ] + + [package.dependencies] +-anyio = ">=3.0.0,<4.0.0" +-h11 = ">=0.11,<0.13" ++anyio = ">=3.0,<5.0" ++certifi = "*" ++h11 = ">=0.13,<0.15" + sniffio = ">=1.0.0,<2.0.0" + + [package.extras] + http2 = ["h2 (>=3,<5)"] ++socks = ["socksio (>=1.0.0,<2.0.0)"] + + [[package]] + name = "httpx" +-version = "0.19.0" ++version = "0.23.3" + description = "The next generation HTTP client." + category = "main" + optional = false +-python-versions = ">=3.6" ++python-versions = ">=3.7" + files = [ +- {file = "httpx-0.19.0-py3-none-any.whl", hash = "sha256:9bd728a6c5ec0a9e243932a9983d57d3cc4a87bb4f554e1360fce407f78f9435"}, +- {file = "httpx-0.19.0.tar.gz", hash = "sha256:92ecd2c00c688b529eda11cedb15161eaf02dee9116712f621c70d9a40b2cdd0"}, ++ {file = "httpx-0.23.3-py3-none-any.whl", hash = "sha256:a211fcce9b1254ea24f0cd6af9869b3d29aba40154e947d2a07bb499b3e310d6"}, ++ {file = "httpx-0.23.3.tar.gz", hash = "sha256:9818458eb565bb54898ccb9b8b251a28785dd4a55afbc23d0eb410754fe7d0f9"}, + ] + + [package.dependencies] + certifi = "*" +-charset-normalizer = "*" + h2 = {version = ">=3,<5", optional = true, markers = "extra == \"http2\""} +-httpcore = ">=0.13.3,<0.14.0" ++httpcore = ">=0.15.0,<0.17.0" + rfc3986 = {version = ">=1.3,<2", extras = ["idna2008"]} + sniffio = "*" + + [package.extras] + brotli = ["brotli", "brotlicffi"] ++cli = ["click (>=8.0.0,<9.0.0)", "pygments (>=2.0.0,<3.0.0)", "rich (>=10,<13)"] + http2 = ["h2 (>=3,<5)"] ++socks = ["socksio (>=1.0.0,<2.0.0)"] + + [[package]] + name = "hyperframe" +@@ -803,6 +809,7 @@ optional = false + python-versions = "*" + files = [ + {file = "libclang-15.0.6.1-py2.py3-none-macosx_10_9_x86_64.whl", hash = "sha256:8621795e07b87e17fc7aac9f071bc7fe6b52ed6110c0a96a9975d8113c8c2527"}, ++ {file = "libclang-15.0.6.1-py2.py3-none-macosx_11_0_arm64.whl", hash = "sha256:0bf192c48a8d2992fc5034393ddc99e772ac30e105df84927d62fc88ef8a659f"}, + {file = "libclang-15.0.6.1-py2.py3-none-manylinux2010_x86_64.whl", hash = "sha256:69b01a23ab543908a661532595daa23cf88bd96d80e41f58ba0eaa6a378fe0d8"}, + {file = "libclang-15.0.6.1-py2.py3-none-manylinux2014_aarch64.whl", hash = "sha256:4a5188184b937132c198ee9de9a8a2316d5fdd1a825398d5ad1a8f5e06f9b40e"}, + {file = "libclang-15.0.6.1-py2.py3-none-manylinux2014_armv7l.whl", hash = "sha256:f7ffa02ac5e586cfffde039dcccc439d88d0feac7d77bf9426d9ba7543d16545"}, +@@ -1745,6 +1752,7 @@ files = [ + {file = "soundfile-0.12.1-py2.py3-none-any.whl", hash = "sha256:828a79c2e75abab5359f780c81dccd4953c45a2c4cd4f05ba3e233ddf984b882"}, + {file = "soundfile-0.12.1-py2.py3-none-macosx_10_9_x86_64.whl", hash = "sha256:d922be1563ce17a69582a352a86f28ed8c9f6a8bc951df63476ffc310c064bfa"}, + {file = "soundfile-0.12.1-py2.py3-none-macosx_11_0_arm64.whl", hash = "sha256:bceaab5c4febb11ea0554566784bcf4bc2e3977b53946dda2b12804b4fe524a8"}, ++ {file = "soundfile-0.12.1-py2.py3-none-manylinux_2_17_x86_64.whl", hash = "sha256:2dc3685bed7187c072a46ab4ffddd38cef7de9ae5eb05c03df2ad569cf4dacbc"}, + {file = "soundfile-0.12.1-py2.py3-none-manylinux_2_31_x86_64.whl", hash = "sha256:074247b771a181859d2bc1f98b5ebf6d5153d2c397b86ee9e29ba602a8dfe2a6"}, + {file = "soundfile-0.12.1-py2.py3-none-win32.whl", hash = "sha256:59dfd88c79b48f441bbf6994142a19ab1de3b9bb7c12863402c2bc621e49091a"}, + {file = "soundfile-0.12.1-py2.py3-none-win_amd64.whl", hash = "sha256:0d86924c00b62552b650ddd28af426e3ff2d4dc2e9047dae5b3d8452e0a49a77"}, +@@ -2198,4 +2206,4 @@ evaluation = ["musdb", "museval"] + [metadata] + lock-version = "2.0" + python-versions = ">=3.7.1,<3.11" +-content-hash = "1a08da1a000648f4dfa3b6dc19b299271b0592a664d5abfd718c730fd568f66a" ++content-hash = "9ba86b33551632cae1f0c799f19c25aa1f9f087caa21691c4ae3e8dff3cfe162" +diff --git a/pyproject.toml b/pyproject.toml +index db723e6..b1ac939 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -47,7 +47,7 @@ include = ["LICENSE", "spleeter/resources/*.json"] + [tool.poetry.dependencies] + python = ">=3.7.1,<3.11" + ffmpeg-python = "^0.2.0" +-httpx = {extras = ["http2"], version = "^0.19.0"} ++httpx = {extras = ["http2"], version = "^0.23.1"} + typer = "^0.3.2" + musdb = {version = "^0.4.0", optional = true} + museval = {version = "^0.4.0", optional = true} +diff --git a/spleeter/model/provider/github.py b/spleeter/model/provider/github.py +index 10a1232..4ec60bc 100644 +--- a/spleeter/model/provider/github.py ++++ b/spleeter/model/provider/github.py +@@ -121,7 +121,7 @@ class GithubModelProvider(ModelProvider): + self.CHECKSUM_INDEX, + ) + ) +- response: httpx.Response = httpx.get(url) ++ response: httpx.Response = httpx.get(url, follow_redirects=True) + response.raise_for_status() + index: Dict = response.json() + if name not in index: +@@ -144,7 +144,7 @@ class GithubModelProvider(ModelProvider): + url = f"{url}.tar.gz" + logger.info(f"Downloading model archive {url}") + with httpx.Client(http2=True) as client: +- with client.stream("GET", url) as response: ++ with client.stream("GET", url, follow_redirects=True) as response: + response.raise_for_status() + archive = NamedTemporaryFile(delete=False) + try: +-- +2.41.0 + diff --git a/str-enum-python311.patch b/str-enum-python311.patch index f8a1510c1a83..032bdb909a24 100644 --- a/str-enum-python311.patch +++ b/str-enum-python311.patch @@ -1,9 +1,9 @@ diff --git a/spleeter/audio/__init__.py b/spleeter/audio/__init__.py -index 32012e1..1a178e8 100644 +index a2f56f4..fcc80cf 100644 --- a/spleeter/audio/__init__.py +++ b/spleeter/audio/__init__.py -@@ -10,14 +10,14 @@ - - Waveform convertion and transforming functions. +@@ -10,14 +10,14 @@ tools for manipulating audio content such as : + - Waveform convertion and transforming functions. """ -from enum import Enum @@ -19,12 +19,3 @@ index 32012e1..1a178e8 100644 """Enumeration of supported audio codec.""" WAV: str = "wav" -@@ -28,7 +28,7 @@ class Codec(str, Enum): - FLAC: str = "flac" - - --class STFTBackend(str, Enum): -+class STFTBackend(StrEnum): - """Enumeration of supported STFT backend.""" - - AUTO: str = "auto" diff --git a/test-eval-xfail.patch b/test-eval-xfail.patch index 4f98a2183982..2980dd360ba9 100644 --- a/test-eval-xfail.patch +++ b/test-eval-xfail.patch @@ -1,36 +1,20 @@ diff --git a/tests/test_eval.py b/tests/test_eval.py -index 9ff4e67..d7e1ad7 100644 +index 42a72bd..2873d9b 100644 --- a/tests/test_eval.py +++ b/tests/test_eval.py -@@ -17,8 +17,20 @@ import numpy as np - from spleeter.__main__ import evaluate - from spleeter.audio.adapter import AudioAdapter +@@ -12,6 +12,7 @@ from os.path import join + from tempfile import TemporaryDirectory --BACKENDS = ['tensorflow', 'librosa'] --TEST_CONFIGURATIONS = {el: el for el in BACKENDS} -+BACKENDS = [ -+ pytest.param( -+ 'tensorflow', -+ marks=pytest.mark.skip( -+ reason='In every stem, results drift by up to 0.6', -+ ), -+ ), -+ pytest.param( -+ 'librosa', -+ marks=pytest.mark.skip( -+ reason='All the metrics are `nan`', -+ ) -+ ), -+] + import numpy as np ++import pytest - res_4stems = { - 'vocals': { -@@ -67,7 +79,7 @@ def generate_fake_eval_dataset(path): + from spleeter.__main__ import evaluate + from spleeter.audio.adapter import AudioAdapter +@@ -43,6 +44,7 @@ def generate_fake_eval_dataset(path): aa.save(filename, data, fs) --@pytest.mark.parametrize('backend', TEST_CONFIGURATIONS) -+@pytest.mark.parametrize('backend', BACKENDS) - def test_evaluate(backend): ++@pytest.mark.xfail(reason='In every stem, results drift by up to 0.6') + def test_evaluate(): with TemporaryDirectory() as dataset: with TemporaryDirectory() as evaluation: |