2021-10-04 12:37:57 +00:00
|
|
|
{ lib
|
2023-07-15 17:15:38 +00:00
|
|
|
, anyio
|
2023-08-04 22:07:22 +00:00
|
|
|
, async-timeout
|
2021-10-04 12:37:57 +00:00
|
|
|
, asyncclick
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2023-07-15 17:15:38 +00:00
|
|
|
, kasa-crypt
|
|
|
|
, orjson
|
2021-10-04 12:37:57 +00:00
|
|
|
, poetry-core
|
2023-07-15 17:15:38 +00:00
|
|
|
, pydantic
|
2021-10-04 12:37:57 +00:00
|
|
|
, pytest-asyncio
|
|
|
|
, pytest-mock
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, voluptuous
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-kasa";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "0.5.4";
|
2021-10-04 12:37:57 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2021-10-04 12:37:57 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
2022-04-15 01:41:22 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-wGPMrYaTtKkkNW88eyiiciFcBSTRqqChYi6e15WUCHo=";
|
2021-10-04 12:37:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2023-07-15 17:15:38 +00:00
|
|
|
anyio
|
2023-08-04 22:07:22 +00:00
|
|
|
async-timeout
|
2021-10-04 12:37:57 +00:00
|
|
|
asyncclick
|
2022-04-27 09:35:20 +00:00
|
|
|
pydantic
|
2021-10-04 12:37:57 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-10-04 12:37:57 +00:00
|
|
|
pytest-asyncio
|
|
|
|
pytest-mock
|
|
|
|
pytestCheckHook
|
|
|
|
voluptuous
|
|
|
|
];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
speedup = [
|
|
|
|
kasa-crypt
|
|
|
|
orjson
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
pytestFlagsArray = [
|
2022-11-21 17:40:18 +00:00
|
|
|
"--asyncio-mode=auto"
|
2022-08-12 12:06:08 +00:00
|
|
|
];
|
|
|
|
|
2021-10-04 12:37:57 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# Skip the examples tests
|
|
|
|
"kasa/tests/test_readme_examples.py"
|
|
|
|
];
|
|
|
|
|
2022-01-19 23:45:15 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"kasa"
|
|
|
|
];
|
2021-10-04 12:37:57 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python API for TP-Link Kasa Smarthome products";
|
|
|
|
homepage = "https://python-kasa.readthedocs.io/";
|
2023-02-22 10:55:15 +00:00
|
|
|
changelog = "https://github.com/python-kasa/python-kasa/blob/${version}/CHANGELOG.md";
|
2021-10-04 12:37:57 +00:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|