From f55aee66316a6215d7ae8cda7ae325d6783e2aaf Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 23 Sep 2024 08:04:49 +0200 Subject: [PATCH] python312Packages.meteoswiss-async: init at 0.1.1 Asynchronous client library for MeteoSwiss API https://github.com/albertomontesg/meteoswiss-async --- .../meteoswiss-async/default.nix | 52 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 54 insertions(+) create mode 100644 pkgs/development/python-modules/meteoswiss-async/default.nix diff --git a/pkgs/development/python-modules/meteoswiss-async/default.nix b/pkgs/development/python-modules/meteoswiss-async/default.nix new file mode 100644 index 000000000000..b837f49c08c6 --- /dev/null +++ b/pkgs/development/python-modules/meteoswiss-async/default.nix @@ -0,0 +1,52 @@ +{ + lib, + aiohttp, + asyncstdlib, + buildPythonPackage, + dataclasses-json, + fetchFromGitHub, + pytest-cov-stub, + pytest-mock, + pytestCheckHook, + pythonOlder, + setuptools, +}: + +buildPythonPackage rec { + pname = "meteoswiss-async"; + version = "0.1.1"; + pyproject = true; + + disabled = pythonOlder "3.11"; + + src = fetchFromGitHub { + owner = "albertomontesg"; + repo = "meteoswiss-async"; + rev = "refs/tags/${version}"; + hash = "sha256-xFvfyLZvBfnbzShKN+94piNUVjV1cfi4jWpc/Xw6XG4="; + }; + + build-system = [ setuptools ]; + + dependencies = [ + aiohttp + asyncstdlib + dataclasses-json + ]; + + nativeCheckInputs = [ + pytestCheckHook + pytest-mock + pytest-cov-stub + ]; + + pythonImportsCheck = [ "meteoswiss_async" ]; + + meta = { + description = "Asynchronous client library for MeteoSwiss API"; + homepage = "https://github.com/albertomontesg/meteoswiss-async"; + changelog = "https://github.com/albertomontesg/meteoswiss-async/releases/tag/${version}"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index a9231aecd6e8..d395c5c53618 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7820,6 +7820,8 @@ self: super: with self; { meteofrance-api = callPackage ../development/python-modules/meteofrance-api { }; + meteoswiss-async = callPackage ../development/python-modules/meteoswiss-async { }; + methodtools = callPackage ../development/python-modules/methodtools { }; mezzanine = callPackage ../development/python-modules/mezzanine { };