python3Packages.meteofrance-api: init at 1.0.2

This commit is contained in:
Fabian Affolter 2022-04-16 22:27:17 +02:00
parent 603b07bfb2
commit f470406b6b
2 changed files with 72 additions and 0 deletions

View file

@ -0,0 +1,70 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, poetry
, pytestCheckHook
, pythonOlder
, pytz
, requests
, requests-mock
, typing-extensions
, urllib3
}:
buildPythonPackage rec {
pname = "meteofrance-api";
version = "1.0.2";
format = "pyproject";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "hacf-fr";
repo = pname;
rev = "v${version}";
hash = "sha256-X8f0z9ZPXH7Wc3GqHmPptxpNxbHeezdOzw4gZCprumU=";
};
nativeBuildInputs = [
# Doesn't work with poetry-core at the moment
poetry
];
propagatedBuildInputs = [
pytz
requests
urllib3
] ++ lib.optionals (pythonOlder "3.7") [
typing-extensions
];
checkInputs = [
pytestCheckHook
requests-mock
];
pythonImportsCheck = [
"meteofrance_api"
];
disabledTests = [
# Tests require network access
"test_currentphenomenons"
"test_forecast"
"test_full_with_coastal_bulletint"
"test_fulls"
"test_no_rain_expected"
"test_picture_of_the_day"
"test_places"
"test_rain"
"test_session"
"test_workflow"
];
meta = with lib; {
description = "Module to access information from the Meteo-France API";
homepage = "https://github.com/hacf-fr/meteofrance-api";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}

View file

@ -5140,6 +5140,8 @@ in {
meteoalertapi = callPackage ../development/python-modules/meteoalertapi { };
meteofrance-api = callPackage ../development/python-modules/meteofrance-api { };
mezzanine = callPackage ../development/python-modules/mezzanine { };
micawber = callPackage ../development/python-modules/micawber { };