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