1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, appdirs
5, pytz
6, requests
7, pytestCheckHook
8, requests-mock
9}:
10
11buildPythonPackage rec {
12 pname = "datapoint";
13 version = "0.9.8";
14
15 src = fetchFromGitHub {
16 owner = "ejep";
17 repo = "datapoint-python";
18 rev = "v${version}";
19 hash = "sha256-YC8KFTv6lnCqMfDw1LSova7XBgmKbR3TpPDAAbH9imw=";
20 };
21
22 propagatedBuildInputs = [
23 appdirs
24 pytz
25 requests
26 ];
27
28 nativeCheckInputs = [
29 pytestCheckHook
30 requests-mock
31 ];
32
33 pytestFlagsArray = [ "tests/unit" ];
34
35 pythonImportsCheck = [ "datapoint" ];
36
37 meta = {
38 description = "Python interface to the Met Office's Datapoint API";
39 homepage = "https://github.com/ejep/datapoint-python";
40 license = lib.licenses.gpl3Only;
41 maintainers = with lib.maintainers; [ dotlambda ];
42 };
43}