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 # requires networking
41 "test_region"
42 ]
43 ++ lib.optionals (pythonAtLeast "3.13") [
44 # AssertionError: MyPermobilAPIException not raised
45 "test_request_item_404"
46 ];
47
48 meta = {
49 changelog = "https://github.com/Permobil-Software/mypermobil/releases/tag/v${version}";
50 description = "Python wrapper for the MyPermobil API";
51 homepage = "https://github.com/Permobil-Software/mypermobil";
52 license = lib.licenses.mit;
53 maintainers = with lib.maintainers; [ dotlambda ];
54 };
55}