01ed8ef136
GitOrigin-RevId: 20fc948445a6c22d4e8d5178e9a6bc6e1f5417c8
59 lines
1 KiB
Nix
59 lines
1 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, isodate
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
, pyyaml
|
|
, requests
|
|
, responses
|
|
, setuptools-scm
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pysolcast";
|
|
version = "1.0.12";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "mcaulifn";
|
|
repo = "solcast";
|
|
rev = "v${version}";
|
|
hash = "sha256-azcEbv/4M3UqRyV30yld+6pWbSxbGXiJJHWMDL4xgOM=";
|
|
};
|
|
|
|
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";
|
|
license = with licenses; [ asl20 ];
|
|
maintainers = with maintainers; [ fab ];
|
|
};
|
|
}
|