From 420543cc59bcc64c58afa786979e1aacf8e743ec Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 22 Dec 2021 23:13:59 +0100 Subject: [PATCH] python3Packages.pvo: init at 0.1.0 --- .../python-modules/pvo/default.nix | 61 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 63 insertions(+) create mode 100644 pkgs/development/python-modules/pvo/default.nix diff --git a/pkgs/development/python-modules/pvo/default.nix b/pkgs/development/python-modules/pvo/default.nix new file mode 100644 index 000000000000..84d6918199ce --- /dev/null +++ b/pkgs/development/python-modules/pvo/default.nix @@ -0,0 +1,61 @@ +{ lib +, aiohttp +, aresponses +, buildPythonPackage +, fetchFromGitHub +, poetry-core +, pydantic +, pytest-asyncio +, pytestCheckHook +, pythonOlder +, yarl +}: + +buildPythonPackage rec { + pname = "pvo"; + version = "0.1.0"; + format = "pyproject"; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "frenck"; + repo = "python-pvoutput"; + rev = "v${version}"; + sha256 = "sha256-m+6fCBPN0LG6HoRwefVVOGEjccoB8mCWJOlSNHxEErM="; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + aiohttp + pydantic + yarl + ]; + + checkInputs = [ + aresponses + pytest-asyncio + pytestCheckHook + ]; + + postPatch = '' + # Upstream doesn't set a version for the pyproject.toml + substituteInPlace pyproject.toml \ + --replace "0.0.0" "${version}" \ + --replace "--cov" "" + ''; + + pythonImportsCheck = [ + "pvo" + ]; + + meta = with lib; { + description = "Python module to interact with the PVOutput API"; + homepage = "https://github.com/frenck/python-pvoutput"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ed9b6739da60..d6cffef74a75 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6277,6 +6277,8 @@ in { pvlib = callPackage ../development/python-modules/pvlib { }; + pvo = callPackage ../development/python-modules/pvo { }; + Pweave = callPackage ../development/python-modules/pweave { }; pwntools = callPackage ../development/python-modules/pwntools {