1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, poetry-core
5, pytestCheckHook
6, pythonOlder
7, pytz
8, requests
9, requests-mock
10, typing-extensions
11, urllib3
12}:
13
14buildPythonPackage rec {
15 pname = "meteofrance-api";
16 version = "1.1.0";
17 format = "pyproject";
18
19 disabled = pythonOlder "3.7";
20
21 src = fetchFromGitHub {
22 owner = "hacf-fr";
23 repo = pname;
24 rev = "v${version}";
25 hash = "sha256-1ZN/9ur6uhK7M5TurmmWgUjzkc79MPqKnT637hbAAWA=";
26 };
27
28 nativeBuildInputs = [
29 poetry-core
30 ];
31
32 propagatedBuildInputs = [
33 pytz
34 requests
35 typing-extensions
36 urllib3
37 ];
38
39 checkInputs = [
40 pytestCheckHook
41 requests-mock
42 ];
43
44 pythonImportsCheck = [
45 "meteofrance_api"
46 ];
47
48 disabledTests = [
49 # Tests require network access
50 "test_currentphenomenons"
51 "test_forecast"
52 "test_full_with_coastal_bulletint"
53 "test_fulls"
54 "test_no_rain_expected"
55 "test_picture_of_the_day"
56 "test_places"
57 "test_rain"
58 "test_session"
59 "test_workflow"
60 ];
61
62 meta = with lib; {
63 description = "Module to access information from the Meteo-France API";
64 homepage = "https://github.com/hacf-fr/meteofrance-api";
65 license = licenses.mit;
66 maintainers = with maintainers; [ fab ];
67 };
68}