2022-04-27 09:35:20 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2022-09-30 11:47:45 +00:00
|
|
|
, poetry-core
|
2022-04-27 09:35:20 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, pytz
|
|
|
|
, requests
|
|
|
|
, requests-mock
|
|
|
|
, typing-extensions
|
|
|
|
, urllib3
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "meteofrance-api";
|
2023-03-04 12:14:45 +00:00
|
|
|
version = "1.2.0";
|
2022-04-27 09:35:20 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hacf-fr";
|
|
|
|
repo = pname;
|
2023-03-04 12:14:45 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-W26R+L2ZJpycEQ9KwkHqVARKsd/5YkJCxMeciKnKAX8=";
|
2022-04-27 09:35:20 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2022-09-30 11:47:45 +00:00
|
|
|
poetry-core
|
2022-04-27 09:35:20 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
pytz
|
|
|
|
requests
|
|
|
|
typing-extensions
|
2022-10-21 18:38:19 +00:00
|
|
|
urllib3
|
2022-04-27 09:35:20 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-04-27 09:35:20 +00:00
|
|
|
pytestCheckHook
|
|
|
|
requests-mock
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"meteofrance_api"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Tests require network access
|
|
|
|
"test_currentphenomenons"
|
|
|
|
"test_forecast"
|
|
|
|
"test_full_with_coastal_bulletint"
|
|
|
|
"test_fulls"
|
|
|
|
"test_no_rain_expected"
|
|
|
|
"test_picture_of_the_day"
|
|
|
|
"test_places"
|
|
|
|
"test_rain"
|
|
|
|
"test_session"
|
2023-03-04 12:14:45 +00:00
|
|
|
"test_observation"
|
2022-04-27 09:35:20 +00:00
|
|
|
"test_workflow"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Module to access information from the Meteo-France API";
|
|
|
|
homepage = "https://github.com/hacf-fr/meteofrance-api";
|
2023-03-04 12:14:45 +00:00
|
|
|
changelog = "https://github.com/hacf-fr/meteofrance-api/releases/tag/v${version}";
|
2022-04-27 09:35:20 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|