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