summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/mypermobil/default.nix
blob: 616af8a8c06bd3b29b5d22db6761dc72166c8aac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  pythonAtLeast,
  setuptools,
  aiocache,
  aiohttp,
  aiounittest,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "mypermobil";
  version = "0.1.8";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "Permobil-Software";
    repo = "mypermobil";
    tag = "v${version}";
    hash = "sha256-linnaRyA45EzqeSeNmvIE5gXkHA2F504U1++QBeRa90=";
  };

  build-system = [ setuptools ];

  dependencies = [
    aiocache
    aiohttp
  ];

  pythonImportsCheck = [ "mypermobil" ];

  nativeCheckInputs = [
    aiounittest
    pytestCheckHook
  ];

  disabledTests = [
    # requires networking
    "test_region"
  ]
  ++ lib.optionals (pythonAtLeast "3.13") [
    # AssertionError: MyPermobilAPIException not raised
    "test_request_item_404"
  ];

  meta = {
    changelog = "https://github.com/Permobil-Software/mypermobil/releases/tag/v${version}";
    description = "Python wrapper for the MyPermobil API";
    homepage = "https://github.com/Permobil-Software/mypermobil";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ dotlambda ];
  };
}