1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, isodate 5, pytestCheckHook 6, pythonOlder 7, pyyaml 8, requests 9, responses 10, setuptools-scm 11}: 12 13buildPythonPackage rec { 14 pname = "pysolcast"; 15 version = "1.0.12"; 16 format = "setuptools"; 17 18 disabled = pythonOlder "3.9"; 19 20 src = fetchFromGitHub { 21 owner = "mcaulifn"; 22 repo = "solcast"; 23 rev = "v${version}"; 24 hash = "sha256-azcEbv/4M3UqRyV30yld+6pWbSxbGXiJJHWMDL4xgOM="; 25 }; 26 27 SETUPTOOLS_SCM_PRETEND_VERSION = version; 28 29 nativeBuildInputs = [ 30 setuptools-scm 31 ]; 32 33 propagatedBuildInputs = [ 34 isodate 35 pyyaml 36 requests 37 ]; 38 39 checkInputs = [ 40 pytestCheckHook 41 responses 42 ]; 43 44 postPatch = '' 45 substituteInPlace setup.cfg \ 46 --replace "pytest-runner" "" 47 ''; 48 49 pythonImportsCheck = [ 50 "pysolcast" 51 ]; 52 53 meta = with lib; { 54 description = "Python library for interacting with the Solcast API"; 55 homepage = "https://github.com/mcaulifn/solcast"; 56 license = with licenses; [ asl20 ]; 57 maintainers = with maintainers; [ fab ]; 58 }; 59}