1{
2 lib,
3 aiohttp,
4 buildPythonPackage,
5 fetchFromGitHub,
6 pytest-asyncio,
7 pytestCheckHook,
8 pythonAtLeast,
9 pythonOlder,
10}:
11
12buildPythonPackage rec {
13 pname = "pysqueezebox";
14 version = "0.7.1";
15 format = "setuptools";
16
17 disabled = pythonOlder "3.6";
18
19 src = fetchFromGitHub {
20 owner = "rajlaud";
21 repo = pname;
22 rev = "refs/tags/v${version}";
23 hash = "sha256-WnL9Va3uaWlUHVBtit4v+XdYOFmPpxG91mAHEGwI+7c=";
24 };
25
26 propagatedBuildInputs = [ aiohttp ];
27
28 nativeCheckInputs = [
29 pytest-asyncio
30 pytestCheckHook
31 ];
32
33 pythonImportsCheck = [ "pysqueezebox" ];
34
35 disabledTests = lib.optionals (pythonAtLeast "3.12") [
36 # AttributeError: 'has_calls' is not a valid assertion. Use a spec for the mock if 'has_calls' is meant to be an attribute.
37 "test_verified_pause"
38 ];
39
40 disabledTestPaths = [
41 # Tests require network access
42 "tests/test_integration.py"
43 ];
44
45 meta = with lib; {
46 description = "Asynchronous library to control Logitech Media Server";
47 homepage = "https://github.com/rajlaud/pysqueezebox";
48 license = licenses.asl20;
49 maintainers = with maintainers; [ nyanloutre ];
50 };
51}