evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / development / python-modules / datapoint / default.nix
blobaec91a0e548b86bd1fca880caf1f0e5a157dac7d
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   fetchpatch2,
6   appdirs,
7   pytz,
8   requests,
9   pytestCheckHook,
10   requests-mock,
11   pythonOlder,
12   setuptools,
15 buildPythonPackage rec {
16   pname = "datapoint";
17   version = "0.9.9";
18   pyproject = true;
20   disabled = pythonOlder "3.8";
22   src = fetchFromGitHub {
23     owner = "ejep";
24     repo = "datapoint-python";
25     rev = "refs/tags/v${version}";
26     hash = "sha256-zUvwfBwJe8SaB96/Jz7Qeanz1mHmLVp2JW9qkR2dRnY=";
27   };
29   patches = [
30     (fetchpatch2 {
31       # Hardcode version (instead of using versioneer)
32       url = "https://github.com/EJEP/datapoint-python/commit/57e649b26ecf39fb11f507eb920b1d059d433721.patch";
33       hash = "sha256-trOPtwlaJDeA4Kau4fwZCxqJiw96+T/le461t09O8io=";
34     })
35   ];
37   nativeBuildInputs = [ setuptools ];
39   propagatedBuildInputs = [
40     appdirs
41     pytz
42     requests
43   ];
45   nativeCheckInputs = [
46     pytestCheckHook
47     requests-mock
48   ];
50   pytestFlagsArray = [ "tests/unit" ];
52   pythonImportsCheck = [ "datapoint" ];
54   meta = {
55     description = "Python interface to the Met Office's Datapoint API";
56     homepage = "https://github.com/ejep/datapoint-python";
57     changelog = "https://github.com/EJEP/datapoint-python/blob/v${version}/CHANGELOG.md";
58     license = lib.licenses.gpl3Only;
59     maintainers = with lib.maintainers; [ dotlambda ];
60   };