Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / python-bsblan / default.nix
blob01d9704c0399d2af2e2c0781b9436557a3d33e5a
1 { lib
2 , aiohttp
3 , aresponses
4 , backoff
5 , buildPythonPackage
6 , fetchFromGitHub
7 , packaging
8 , poetry-core
9 , pydantic
10 , pytest-asyncio
11 , pytest-mock
12 , pytestCheckHook
13 , pythonOlder
14 , yarl
17 buildPythonPackage rec {
18   pname = "python-bsblan";
19   version = "0.5.18";
20   format = "pyproject";
22   disabled = pythonOlder "3.9";
24   src = fetchFromGitHub {
25     owner = "liudger";
26     repo = pname;
27     rev = "refs/tags/v${version}";
28     hash = "sha256-SJUIJhsVn4LZiUx9h3Q2uWoeaQiKoIRrijTfPgCHnAA=";
29   };
31   postPatch = ''
32     substituteInPlace pyproject.toml \
33       --replace 'version = "0.0.0"' 'version = "${version}"' \
34       --replace "--cov" ""
35     sed -i "/covdefaults/d" pyproject.toml
36     sed -i "/ruff/d" pyproject.toml
37   '';
39   nativeBuildInputs = [
40     poetry-core
41   ];
43   propagatedBuildInputs = [
44     aiohttp
45     backoff
46     packaging
47     pydantic
48     yarl
49   ];
51   nativeCheckInputs = [
52     aresponses
53     pytest-asyncio
54     pytest-mock
55     pytestCheckHook
56   ];
58   disabledTests = lib.optionals (lib.versionAtLeast aiohttp.version "3.9.0") [
59     # https://github.com/liudger/python-bsblan/issues/808
60     "test_http_error400"
61     "test_not_authorized_401_response"
62   ];
64   pythonImportsCheck = [
65     "bsblan"
66   ];
68   meta = with lib; {
69     description = "Module to control and monitor an BSBLan device programmatically";
70     homepage = "https://github.com/liudger/python-bsblan";
71     changelog = "https://github.com/liudger/python-bsblan/releases/tag/v${version}";
72     license = with licenses; [ mit ];
73     maintainers = with maintainers; [ fab ];
74   };