1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonAtLeast,
6 setuptools,
7 aiocache,
8 aiohttp,
9 aiounittest,
10 pytestCheckHook,
11}:
12
13buildPythonPackage rec {
14 pname = "mypermobil";
15 version = "0.1.8";
16 pyproject = true;
17
18 src = fetchFromGitHub {
19 owner = "Permobil-Software";
20 repo = "mypermobil";
21 tag = "v${version}";
22 hash = "sha256-linnaRyA45EzqeSeNmvIE5gXkHA2F504U1++QBeRa90=";
23 };
24
25 build-system = [ setuptools ];
26
27 dependencies = [
28 aiocache
29 aiohttp
30 ];
31
32 pythonImportsCheck = [ "mypermobil" ];
33
34 nativeCheckInputs = [
35 aiounittest
36 pytestCheckHook
37 ];
38
39 disabledTests =
40 [
41 # requires networking
42 "test_region"
43 ]
44 ++ lib.optionals (pythonAtLeast "3.13") [
45 # AssertionError: MyPermobilAPIException not raised
46 "test_request_item_404"
47 ];
48
49 meta = {
50 changelog = "https://github.com/Permobil-Software/mypermobil/releases/tag/v${version}";
51 description = "Python wrapper for the MyPermobil API";
52 homepage = "https://github.com/Permobil-Software/mypermobil";
53 license = lib.licenses.mit;
54 maintainers = with lib.maintainers; [ dotlambda ];
55 };
56}