beets: modernize and disable failing test (#385592)
This commit is contained in:
@@ -1,13 +1,16 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
src,
|
||||
version,
|
||||
fetchpatch,
|
||||
bashInteractive,
|
||||
diffPlugins,
|
||||
gobject-introspection,
|
||||
gst_all_1,
|
||||
python3Packages,
|
||||
sphinxHook,
|
||||
writableTmpDirAsHomeHook,
|
||||
runtimeShell,
|
||||
writeScript,
|
||||
|
||||
@@ -78,7 +81,19 @@ python3Packages.buildPythonApplication {
|
||||
inherit src version;
|
||||
pyproject = true;
|
||||
|
||||
patches = extraPatches;
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
# Already on master. TODO: remove when updating to the next release
|
||||
# Issue: https://github.com/beetbox/beets/issues/5527
|
||||
# PR: https://github.com/beetbox/beets/pull/5650
|
||||
name = "fix-im-backend";
|
||||
url = "https://github.com/beetbox/beets/commit/1f938674015ee71431fe9bd97c2214f58473efd2.patch";
|
||||
hash = "sha256-koCYeiUhk1ifo6CptOSu3p7Nz0FFUeiuArTknM/tpVQ=";
|
||||
excludes = [
|
||||
"docs/changelog.rst"
|
||||
];
|
||||
})
|
||||
] ++ extraPatches;
|
||||
|
||||
build-system = [
|
||||
python3Packages.poetry-core
|
||||
@@ -145,14 +160,26 @@ python3Packages.buildPythonApplication {
|
||||
rarfile
|
||||
responses
|
||||
]
|
||||
++ [
|
||||
writableTmpDirAsHomeHook
|
||||
]
|
||||
++ pluginWrapperBins;
|
||||
|
||||
__darwinAllowLocalNetworking = true;
|
||||
|
||||
disabledTestPaths = disabledTestPaths ++ [
|
||||
# touches network
|
||||
"test/plugins/test_aura.py"
|
||||
];
|
||||
disabledTestPaths =
|
||||
disabledTestPaths
|
||||
++ [
|
||||
# touches network
|
||||
"test/plugins/test_aura.py"
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
# Flaky: several tests fail randomly with:
|
||||
# if not self._poll(timeout):
|
||||
# raise Empty
|
||||
# _queue.Empty
|
||||
"test/plugins/test_player.py"
|
||||
];
|
||||
disabledTests = disabledTests ++ [
|
||||
# beets.ui.UserError: unknown command 'autobpm'
|
||||
"test/plugins/test_autobpm.py::TestAutoBPMPlugin::test_import"
|
||||
@@ -170,8 +197,7 @@ python3Packages.buildPythonApplication {
|
||||
| sort -u > plugins_available
|
||||
${diffPlugins (attrNames builtinPlugins) "plugins_available"}
|
||||
|
||||
export BEETS_TEST_SHELL="${bashInteractive}/bin/bash --norc"
|
||||
export HOME="$(mktemp -d)"
|
||||
export BEETS_TEST_SHELL="${lib.getExe bashInteractive} --norc"
|
||||
|
||||
env EDITOR="${writeScript "beetconfig.sh" ''
|
||||
#!${runtimeShell}
|
||||
|
||||
@@ -38,7 +38,7 @@ lib.makeExtensible (self: {
|
||||
src = fetchFromGitHub {
|
||||
owner = "beetbox";
|
||||
repo = "beets";
|
||||
rev = "v${version}";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-jhwXRgUUQJgQ/PLwvY1UfHCJ9UC8DcdBpE/janao0RM=";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -3,38 +3,51 @@
|
||||
fetchFromGitHub,
|
||||
beets,
|
||||
python3Packages,
|
||||
writableTmpDirAsHomeHook,
|
||||
}:
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "beets-alternatives";
|
||||
version = "0.13.0";
|
||||
version = "0.13.1";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
repo = "beets-alternatives";
|
||||
owner = "geigerzaehler";
|
||||
rev = "refs/tags/v${version}";
|
||||
sha256 = "sha256-i67Bzdh84TuVwcgwo5SgHFp1W04KF3VA6cbrFz82je0=";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-+LvQC7hYtbJeWJiDEKtSFZaEtnuXZ+4mI75rrX9Sd64=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
beets
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
python3Packages.poetry-core
|
||||
];
|
||||
|
||||
nativeCheckInputs = with python3Packages; [
|
||||
pytestCheckHook
|
||||
pytest-cov
|
||||
mock
|
||||
typeguard
|
||||
nativeCheckInputs =
|
||||
with python3Packages;
|
||||
[
|
||||
pytestCheckHook
|
||||
pytest-cov-stub
|
||||
mock
|
||||
typeguard
|
||||
]
|
||||
++ [
|
||||
writableTmpDirAsHomeHook
|
||||
];
|
||||
|
||||
disabledTests = [
|
||||
# ValueError: too many values to unpack (expected 2)
|
||||
# https://github.com/geigerzaehler/beets-alternatives/issues/122
|
||||
"test_embed_art"
|
||||
];
|
||||
preCheck = ''
|
||||
export HOME=$(mktemp -d)
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Beets plugin to manage external files";
|
||||
homepage = "https://github.com/geigerzaehler/beets-alternatives";
|
||||
changelog = "https://github.com/geigerzaehler/beets-alternatives/blob/v${version}/CHANGELOG.md";
|
||||
maintainers = with lib.maintainers; [
|
||||
aszlig
|
||||
lovesegfault
|
||||
|
||||
Reference in New Issue
Block a user