2021-06-29 16:34:30 +01:00
|
|
|
{ lib
|
|
|
|
, aiohttp
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, geopy
|
|
|
|
, imageio
|
2021-08-10 21:23:30 +01:00
|
|
|
, lxml
|
2021-06-29 16:34:30 +01:00
|
|
|
, pillow
|
|
|
|
, pytestCheckHook
|
|
|
|
, python-dateutil
|
2021-11-21 09:39:11 +00:00
|
|
|
, pythonOlder
|
2021-09-20 08:30:59 +01:00
|
|
|
, voluptuous
|
2021-06-29 16:34:30 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "env-canada";
|
2022-01-03 19:21:21 +00:00
|
|
|
version = "0.5.20";
|
2021-11-21 09:39:11 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
2021-06-29 16:34:30 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "michaeldavie";
|
|
|
|
repo = "env_canada";
|
|
|
|
rev = "v${version}";
|
2022-01-03 19:21:21 +00:00
|
|
|
sha256 = "sha256-gYl5+rtOzci3nhgP74VM37tNk9pPWgcNBfcSSG1fSJs=";
|
2021-06-29 16:34:30 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
|
|
|
geopy
|
|
|
|
imageio
|
2021-08-10 21:23:30 +01:00
|
|
|
lxml
|
2021-06-29 16:34:30 +01:00
|
|
|
pillow
|
|
|
|
python-dateutil
|
2021-09-20 08:30:59 +01:00
|
|
|
voluptuous
|
2021-06-29 16:34:30 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Tests require network access
|
|
|
|
"test_get_aqhi_regions"
|
|
|
|
"test_update"
|
|
|
|
"test_get_hydro_sites"
|
|
|
|
"test_echydro"
|
|
|
|
"test_get_dimensions"
|
|
|
|
"test_get_latest_frame"
|
|
|
|
"test_get_loop"
|
|
|
|
"test_get_ec_sites"
|
2021-07-22 10:03:06 +01:00
|
|
|
"test_ecradar"
|
2021-06-29 16:34:30 +01:00
|
|
|
];
|
|
|
|
|
2021-11-21 09:39:11 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"env_canada"
|
|
|
|
];
|
2021-06-29 16:34:30 +01:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python library to get Environment Canada weather data";
|
|
|
|
homepage = "https://github.com/michaeldavie/env_canada";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|