From 973260c8c4a45665a93ee9ecae05bb0798c32279 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 6 Feb 2021 22:14:30 +0100 Subject: [PATCH] python3Packages.pyopenuv: init at 2.0.1 --- .../python-modules/pyopenuv/default.nix | 50 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 52 insertions(+) create mode 100644 pkgs/development/python-modules/pyopenuv/default.nix diff --git a/pkgs/development/python-modules/pyopenuv/default.nix b/pkgs/development/python-modules/pyopenuv/default.nix new file mode 100644 index 00000000000..a5414021b25 --- /dev/null +++ b/pkgs/development/python-modules/pyopenuv/default.nix @@ -0,0 +1,50 @@ +{ lib +, aiohttp +, aresponses +, async-timeout +, asynctest +, buildPythonPackage +, fetchFromGitHub +, poetry-core +, pytest-aiohttp +, pytest-asyncio +, pytest-cov +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "pyopenuv"; + version = "2.0.1"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "bachya"; + repo = pname; + rev = version; + sha256 = "1pzdcy65gndrlyhrwyc1rwsh8n4w79wla8n9fr13m00vac3cqkl0"; + }; + + nativeBuildInputs = [ poetry-core ]; + + propagatedBuildInputs = [ aiohttp ]; + + checkInputs = [ + aresponses + asynctest + pytest-asyncio + pytest-aiohttp + pytest-cov + pytestCheckHook + ]; + + # Ignore the examples as they are prefixed with test_ + pytestFlagsArray = [ "--ignore examples/" ]; + pythonImportsCheck = [ "pyopenuv" ]; + + meta = with lib; { + description = "Python API to retrieve data from openuv.io"; + homepage = "https://github.com/bachya/pyopenuv"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 3d66eaaa5b0..516004404a3 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5719,6 +5719,8 @@ in { pyopenssl = callPackage ../development/python-modules/pyopenssl { }; + pyopenuv = callPackage ../development/python-modules/pyopenuv { }; + pyopnsense = callPackage ../development/python-modules/pyopnsense { }; pyosf = callPackage ../development/python-modules/pyosf { };