567e8dfd8e
This commit was created by a combination of scripts and tools: - an ast-grep script to prefix things in meta with `lib.`, - a modified nixf-diagnose / nixf combination to remove unused `with lib;`, and - regular nixfmt. Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
74 lines
1.5 KiB
Nix
74 lines
1.5 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
pythonOlder,
|
|
aiodns,
|
|
aiohttp,
|
|
aresponses,
|
|
poetry-core,
|
|
pytest-asyncio,
|
|
pytest-cov-stub,
|
|
pytest-freezer,
|
|
pytestCheckHook,
|
|
syrupy,
|
|
yarl,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "forecast-solar";
|
|
version = "4.2.0";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.11";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "home-assistant-libs";
|
|
repo = "forecast_solar";
|
|
tag = "v${version}";
|
|
hash = "sha256-ZBkuhONvn1/QpD+ml3HJinMIdg1HFpVj5KZAlUt/qR4=";
|
|
};
|
|
|
|
build-system = [ poetry-core ];
|
|
|
|
env.PACKAGE_VERSION = version;
|
|
|
|
dependencies = [
|
|
aiodns
|
|
aiohttp
|
|
yarl
|
|
];
|
|
|
|
pythonImportsCheck = [ "forecast_solar" ];
|
|
|
|
nativeCheckInputs = [
|
|
aresponses
|
|
pytest-asyncio
|
|
pytest-cov-stub
|
|
pytest-freezer
|
|
pytestCheckHook
|
|
syrupy
|
|
];
|
|
|
|
disabledTests = [
|
|
# "Error while resolving Forecast.Solar API address"
|
|
"test_api_key_validation"
|
|
"test_estimated_forecast"
|
|
"test_internal_session"
|
|
"test_json_request"
|
|
"test_plane_validation"
|
|
"test_status_400"
|
|
"test_status_401"
|
|
"test_status_422"
|
|
"test_status_429"
|
|
];
|
|
|
|
meta = {
|
|
changelog = "https://github.com/home-assistant-libs/forecast_solar/releases/tag/v${version}";
|
|
description = "Asynchronous Python client for getting forecast solar information";
|
|
homepage = "https://github.com/home-assistant-libs/forecast_solar";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ dotlambda ];
|
|
};
|
|
}
|