nixpkgs/pkgs/tools/audio/beets/alternatives-plugin.nix
aszlig bd2aeb4883
beets-alternatives: Disable test suite for now
Regression introduced by 94351197cd.

Running the tests results in the following traceback:
  ...
  File ".../unittest/loader.py", line 91, in loadTestsFromName
    module = __import__('.'.join(parts_copy))
  File ".../test/regrtest.py", line 184, in <module>
    for module in sys.modules.itervalues():
RuntimeError: dictionary changed size during iteration

The reason for this is that the test directory itself is called "test"
and the package including regrtest.py is also called "test", so the
loader tries to load tests from its own implementation.

We could fix this by changing PYTHONPATH and/or making the test
directory a proper package, but we'd still have failing tests because
beets itself is required to run the tests.

However for now I'm just removing the unit_tests kwarg in setup.py so
that we have the same behaviour as before the initially mentioned
commit.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2017-09-02 02:36:28 +02:00

27 lines
709 B
Nix

{ stdenv, fetchFromGitHub, pythonPackages }:
pythonPackages.buildPythonApplication rec {
name = "beets-alternatives-${version}";
version = "0.8.2";
src = fetchFromGitHub {
repo = "beets-alternatives";
owner = "geigerzaehler";
rev = "v${version}";
sha256 = "10za6h59pxa13y8i4amqhc6392csml0dl771lssv6b6a98kamsy7";
};
postPatch = ''
sed -i -e '/install_requires/,/\]/{/beets/d}' setup.py
sed -i -e '/test_suite/d' setup.py
'';
propagatedBuildInputs = with pythonPackages; [ futures ];
meta = {
description = "Beets plugin to manage external files";
homepage = https://github.com/geigerzaehler/beets-alternatives;
license = stdenv.lib.licenses.mit;
};
}