From ab10be129eed0f7a5c832b85c561262a3156d559 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 3 Dec 2021 19:26:08 +0100 Subject: [PATCH] python3Packages.pysolcast: init at 1.0.7 --- .../python-modules/pysolcast/default.nix | 61 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 63 insertions(+) create mode 100644 pkgs/development/python-modules/pysolcast/default.nix diff --git a/pkgs/development/python-modules/pysolcast/default.nix b/pkgs/development/python-modules/pysolcast/default.nix new file mode 100644 index 000000000000..fea0b68dcce9 --- /dev/null +++ b/pkgs/development/python-modules/pysolcast/default.nix @@ -0,0 +1,61 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, isodate +, pytestCheckHook +, pythonOlder +, pyyaml +, requests +, responses +, setuptools-scm +}: + +buildPythonPackage rec { + pname = "pysolcast"; + version = "1.0.7"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "mcaulifn"; + repo = "solcast"; + rev = "v${version}"; + sha256 = "J4D7W89Qz1Nv4DeqOmHVAWfmThlY5puBjSClRkfwhVw="; + }; + + SETUPTOOLS_SCM_PRETEND_VERSION = version; + + nativeBuildInputs = [ + setuptools-scm + ]; + + propagatedBuildInputs = [ + isodate + pyyaml + requests + ]; + + checkInputs = [ + pytestCheckHook + responses + ]; + + postPatch = '' + substituteInPlace setup.cfg \ + --replace "pytest-runner" "" + ''; + + pythonImportsCheck = [ + "pysolcast" + ]; + + meta = with lib; { + description = "Python library for interacting with the Solcast API"; + homepage = "https://github.com/mcaulifn/solcast"; + # No license statement present + # https://github.com/mcaulifn/solcast/issues/70 + license = with licenses; [ unfree ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 2f415e50f96f..b42beaed0623 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5845,6 +5845,8 @@ in { pyskyqhub = callPackage ../development/python-modules/pyskyqhub { }; + pysolcast = callPackage ../development/python-modules/pysolcast { }; + pysyncthru = callPackage ../development/python-modules/pysyncthru { }; python-codon-tables = callPackage ../development/python-modules/python-codon-tables { };