diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/pysolcast/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/pysolcast/default.nix | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/pysolcast/default.nix b/nixpkgs/pkgs/development/python-modules/pysolcast/default.nix new file mode 100644 index 000000000000..fea0b68dcce9 --- /dev/null +++ b/nixpkgs/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 ]; + }; +} |