2021-04-25 03:57:28 +00:00
|
|
|
{ lib
|
|
|
|
, aiohttp
|
|
|
|
, aresponses
|
2022-02-10 20:34:41 +00:00
|
|
|
, awesomeversion
|
|
|
|
, backoff
|
2021-12-06 16:07:01 +00:00
|
|
|
, buildPythonPackage
|
2022-01-27 00:19:43 +00:00
|
|
|
, cachetools
|
2021-12-06 16:07:01 +00:00
|
|
|
, fetchFromGitHub
|
2022-03-30 09:31:56 +00:00
|
|
|
, poetry-core
|
2021-04-25 03:57:28 +00:00
|
|
|
, pytest-asyncio
|
2022-06-26 10:26:21 +00:00
|
|
|
, pytest-freezegun
|
2021-04-25 03:57:28 +00:00
|
|
|
, pytestCheckHook
|
2021-12-06 16:07:01 +00:00
|
|
|
, pythonOlder
|
|
|
|
, xmltodict
|
|
|
|
, yarl
|
2021-04-25 03:57:28 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "rokuecp";
|
2022-07-14 12:49:19 +00:00
|
|
|
version = "0.17.0";
|
2022-02-10 20:34:41 +00:00
|
|
|
format = "pyproject";
|
2021-04-25 03:57:28 +00:00
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
disabled = pythonOlder "3.9";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2021-04-25 03:57:28 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ctalkington";
|
|
|
|
repo = "python-rokuecp";
|
|
|
|
rev = version;
|
2022-07-14 12:49:19 +00:00
|
|
|
hash = "sha256-M4eZzFphhc96Pf1bspD+Hvl9SUN1N72xnxdtVFiPc78=";
|
2021-04-25 03:57:28 +00:00
|
|
|
};
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
nativeBuildInputs = [
|
2022-03-30 09:31:56 +00:00
|
|
|
poetry-core
|
2022-02-10 20:34:41 +00:00
|
|
|
];
|
|
|
|
|
2021-04-25 03:57:28 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
2022-02-10 20:34:41 +00:00
|
|
|
backoff
|
2022-01-27 00:19:43 +00:00
|
|
|
cachetools
|
2021-04-25 03:57:28 +00:00
|
|
|
xmltodict
|
2022-02-10 20:34:41 +00:00
|
|
|
awesomeversion
|
2021-04-25 03:57:28 +00:00
|
|
|
yarl
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
aresponses
|
|
|
|
pytest-asyncio
|
2022-06-26 10:26:21 +00:00
|
|
|
pytest-freezegun
|
|
|
|
pytestCheckHook
|
2021-04-25 03:57:28 +00:00
|
|
|
];
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
2022-03-30 09:31:56 +00:00
|
|
|
--replace 'version = "0.0.0"' 'version = "${version}"' \
|
2022-02-10 20:34:41 +00:00
|
|
|
--replace " --cov" ""
|
|
|
|
'';
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
disabledTests = [
|
2022-03-30 09:31:56 +00:00
|
|
|
# Network related tests are having troube in the sandbox
|
2021-12-06 16:07:01 +00:00
|
|
|
"test_resolve_hostname"
|
2022-03-30 09:31:56 +00:00
|
|
|
"test_get_dns_state"
|
2022-02-20 05:27:41 +00:00
|
|
|
# Assertion issue
|
|
|
|
"test_guess_stream_format"
|
2022-06-26 10:26:21 +00:00
|
|
|
"test_update_tv"
|
|
|
|
"test_get_apps_single_app"
|
|
|
|
"test_get_tv_channels_single_channel"
|
2021-12-06 16:07:01 +00:00
|
|
|
];
|
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"rokuecp"
|
|
|
|
];
|
|
|
|
|
2021-04-25 03:57:28 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Asynchronous Python client for Roku (ECP)";
|
|
|
|
homepage = "https://github.com/ctalkington/python-rokuecp";
|
|
|
|
license = licenses.mit;
|
2021-12-06 16:07:01 +00:00
|
|
|
maintainers = with maintainers; [ fab ];
|
2021-04-25 03:57:28 +00:00
|
|
|
};
|
|
|
|
}
|