depot/third_party/nixpkgs/pkgs/development/python-modules/pykaleidescape/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

60 lines
1.2 KiB
Nix

{
lib,
aiohttp,
buildPythonPackage,
dnspython,
fetchFromGitHub,
pytest-asyncio,
pytestCheckHook,
pythonAtLeast,
pythonOlder,
setuptools,
}:
buildPythonPackage rec {
pname = "pykaleidescape";
version = "1.0.1";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "SteveEasley";
repo = "pykaleidescape";
rev = "refs/tags/v${version}";
hash = "sha256-KM/gtpsQ27QZz2uI1t/yVN5no0zp9LZag1duAJzK55g=";
};
nativeBuildInputs = [ setuptools ];
propagatedBuildInputs = [
aiohttp
dnspython
];
nativeCheckInputs = [
pytest-asyncio
pytestCheckHook
];
pythonImportsCheck = [ "kaleidescape" ];
disabledTests =
[
# Test requires network access
"test_resolve_succeeds"
]
++ lib.optionals (pythonAtLeast "3.12") [
# stuck in EpollSelector.poll()
"test_manual_disconnect"
"test_concurrency"
];
meta = with lib; {
description = "Module for controlling Kaleidescape devices";
homepage = "https://github.com/SteveEasley/pykaleidescape";
changelog = "https://github.com/SteveEasley/pykaleidescape/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}