anki-bin: 24.06.3 -> 24.11 (#360722)
[NixPkgs.git] / pkgs / development / python-modules / bimmer-connected / default.nix
blob8958095a9cd481773380fbf670648944c91e3769
2   lib,
3   buildPythonPackage,
4   pythonOlder,
5   fetchFromGitHub,
6   pbr,
7   httpx,
8   pillow,
9   pycryptodome,
10   pyjwt,
11   pytest-asyncio,
12   pytestCheckHook,
13   python,
14   respx,
15   setuptools,
16   time-machine,
17   tzdata,
20 buildPythonPackage rec {
21   pname = "bimmer-connected";
22   version = "0.16.4";
23   pyproject = true;
25   disabled = pythonOlder "3.8";
27   src = fetchFromGitHub {
28     owner = "bimmerconnected";
29     repo = "bimmer_connected";
30     rev = "refs/tags/${version}";
31     hash = "sha256-1Ef+8G30LdMtmOKOPoN3Xa7yhlHLBQvwoiPHJazu3c4=";
32   };
34   build-system = [
35     pbr
36     setuptools
37   ];
39   PBR_VERSION = version;
41   dependencies = [
42     httpx
43     pycryptodome
44     pyjwt
45   ];
47   optional-dependencies = {
48     china = [ pillow ];
49   };
51   postInstall = ''
52     cp -R bimmer_connected/tests/responses $out/${python.sitePackages}/bimmer_connected/tests/
53   '';
55   nativeCheckInputs = [
56     pytest-asyncio
57     pytestCheckHook
58     respx
59     time-machine
60   ] ++ lib.flatten (lib.attrValues optional-dependencies);
62   disabledTests = [
63     # presumably regressed in pytest-asyncio 0.23.0
64     "test_get_remote_position_too_old"
65   ];
67   preCheck = ''
68     export TZDIR=${tzdata}/${python.sitePackages}/tzdata/zoneinfo
69     export PATH=$out/bin:$PATH
70   '';
72   pythonImportsCheck = [ "bimmer_connected" ];
74   meta = with lib; {
75     changelog = "https://github.com/bimmerconnected/bimmer_connected/releases/tag/${version}";
76     description = "Library to read data from the BMW Connected Drive portal";
77     mainProgram = "bimmerconnected";
78     homepage = "https://github.com/bimmerconnected/bimmer_connected";
79     license = licenses.asl20;
80     maintainers = with maintainers; [ dotlambda ];
81   };