2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
aiohttp,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytestCheckHook,
|
2021-04-25 03:57:28 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "smhi-pkg";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "1.0.17";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2021-04-25 03:57:28 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "joysoftware";
|
|
|
|
repo = "pypi_smhi";
|
2022-09-22 12:36:57 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-dJh44JGWy3VafTnwwxWcr5cXClmzY1YuySy1RJzOak8=";
|
2021-04-25 03:57:28 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ aiohttp ];
|
2021-04-25 03:57:28 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-04-25 03:57:28 +00:00
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Disable tests that needs network access
|
|
|
|
"test_smhi_integration_test"
|
|
|
|
"test_smhi_async_integration_test"
|
|
|
|
"test_smhi_async_integration_test_use_session"
|
|
|
|
"test_smhi_async_get_forecast_integration2"
|
|
|
|
"test_async_error_from_api"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "smhi" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python library for accessing SMHI open forecast data";
|
|
|
|
homepage = "https://github.com/joysoftware/pypi_smhi";
|
|
|
|
changelog = "https://github.com/joysoftware/pypi_smhi/releases/tag/${version}";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|