1{
2 lib,
3 aiohttp,
4 buildPythonPackage,
5 fetchFromGitHub,
6 geopy,
7 imageio,
8 lxml,
9 pandas,
10 pillow,
11 pytestCheckHook,
12 python-dateutil,
13 pythonOlder,
14 setuptools,
15 voluptuous,
16}:
17
18buildPythonPackage rec {
19 pname = "env-canada";
20 version = "0.7.2";
21 pyproject = true;
22
23 disabled = pythonOlder "3.8";
24
25 src = fetchFromGitHub {
26 owner = "michaeldavie";
27 repo = "env_canada";
28 rev = "refs/tags/v${version}";
29 hash = "sha256-3SVpzWii9/ViJ7mbrqzKmN5FkOOYTeYdhJll6q/IseU=";
30 };
31
32 build-system = [ setuptools ];
33
34 dependencies = [
35 aiohttp
36 geopy
37 imageio
38 lxml
39 pandas
40 pillow
41 python-dateutil
42 voluptuous
43 ];
44
45 nativeCheckInputs = [ pytestCheckHook ];
46
47 disabledTests = [
48 # Tests require network access
49 "test_get_aqhi_regions"
50 "test_update"
51 "test_get_hydro_sites"
52 "test_echydro"
53 "test_get_dimensions"
54 "test_get_latest_frame"
55 "test_get_loop"
56 "test_get_ec_sites"
57 "test_ecradar"
58 ];
59
60 pythonImportsCheck = [ "env_canada" ];
61
62 meta = with lib; {
63 description = "Python library to get Environment Canada weather data";
64 homepage = "https://github.com/michaeldavie/env_canada";
65 changelog = "https://github.com/michaeldavie/env_canada/blob/v${version}/CHANGELOG.md";
66 license = with licenses; [ mit ];
67 maintainers = with maintainers; [ fab ];
68 };
69}