Merge pull request #168961 from fabaff/meteofrance-api
python3Packages.meteofrance-api: init at 1.0.2
This commit is contained in:
commit
43569c0857
70
pkgs/development/python-modules/meteofrance-api/default.nix
Normal file
70
pkgs/development/python-modules/meteofrance-api/default.nix
Normal 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 ];
|
||||
};
|
||||
}
|
|
@ -1536,7 +1536,8 @@
|
|||
pymeteireann
|
||||
];
|
||||
"meteo_france" = ps: with ps; [
|
||||
]; # missing inputs: meteofrance-api
|
||||
meteofrance-api
|
||||
];
|
||||
"meteoalarm" = ps: with ps; [
|
||||
meteoalertapi
|
||||
];
|
||||
|
@ -3420,6 +3421,7 @@
|
|||
"meraki"
|
||||
"met"
|
||||
"met_eireann"
|
||||
"meteo_france"
|
||||
"meteoclimatic"
|
||||
"microsoft_face"
|
||||
"microsoft_face_detect"
|
||||
|
|
|
@ -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 { };
|
||||
|
|
Loading…
Reference in a new issue