2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
aiohttp,
|
|
|
|
async-timeout,
|
|
|
|
asyncclick,
|
|
|
|
buildPythonPackage,
|
|
|
|
cryptography,
|
|
|
|
fetchFromGitHub,
|
2024-09-19 14:19:46 +00:00
|
|
|
hatchling,
|
2024-06-05 15:53:02 +00:00
|
|
|
kasa-crypt,
|
|
|
|
orjson,
|
2024-07-27 06:49:29 +00:00
|
|
|
ptpython,
|
2024-06-05 15:53:02 +00:00
|
|
|
pydantic,
|
|
|
|
pytest-asyncio,
|
2024-07-27 06:49:29 +00:00
|
|
|
pytest-freezer,
|
2024-06-05 15:53:02 +00:00
|
|
|
pytest-mock,
|
2024-10-04 16:56:33 +00:00
|
|
|
pytest-socket,
|
2024-06-05 15:53:02 +00:00
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
2024-07-27 06:49:29 +00:00
|
|
|
rich,
|
2024-06-05 15:53:02 +00:00
|
|
|
voluptuous,
|
2021-10-04 12:37:57 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-kasa";
|
2024-10-04 16:56:33 +00:00
|
|
|
version = "0.7.4";
|
2024-01-25 14:12:00 +00:00
|
|
|
pyproject = true;
|
2021-10-04 12:37:57 +00:00
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
disabled = pythonOlder "3.9";
|
2021-10-04 12:37:57 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2024-01-25 14:12:00 +00:00
|
|
|
owner = "python-kasa";
|
|
|
|
repo = "python-kasa";
|
2022-04-15 01:41:22 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-10-04 16:56:33 +00:00
|
|
|
hash = "sha256-dzDbA/iJUfTQNKq2V1PlCYpIeg031Fm0JyZvHrDWqHI=";
|
2021-10-04 12:37:57 +00:00
|
|
|
};
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
build-system = [ hatchling ];
|
2021-10-04 12:37:57 +00:00
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
dependencies = [
|
2024-01-25 14:12:00 +00:00
|
|
|
aiohttp
|
2023-08-04 22:07:22 +00:00
|
|
|
async-timeout
|
2021-10-04 12:37:57 +00:00
|
|
|
asyncclick
|
2024-01-25 14:12:00 +00:00
|
|
|
cryptography
|
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
|
2024-07-27 06:49:29 +00:00
|
|
|
pytest-freezer
|
2021-10-04 12:37:57 +00:00
|
|
|
pytest-mock
|
2024-10-04 16:56:33 +00:00
|
|
|
pytest-socket
|
2021-10-04 12:37:57 +00:00
|
|
|
pytestCheckHook
|
|
|
|
voluptuous
|
|
|
|
];
|
|
|
|
|
2024-10-04 16:56:33 +00:00
|
|
|
optional-dependencies = {
|
2024-07-27 06:49:29 +00:00
|
|
|
shell = [
|
|
|
|
ptpython
|
|
|
|
rich
|
|
|
|
];
|
2024-02-07 01:22:34 +00:00
|
|
|
speedups = [
|
2023-07-15 17:15:38 +00:00
|
|
|
kasa-crypt
|
|
|
|
orjson
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pytestFlagsArray = [ "--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"
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +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 ];
|
2024-07-27 06:49:29 +00:00
|
|
|
mainProgram = "kasa";
|
2021-10-04 12:37:57 +00:00
|
|
|
};
|
|
|
|
}
|