depot/third_party/nixpkgs/pkgs/development/python-modules/pysolcast/default.nix
Default email 6d4aeb4377 Project import generated by Copybara.
GitOrigin-RevId: 0f213d0fee84280d8c3a97f7469b988d6fe5fcdf
2023-01-11 08:51:40 +01:00

60 lines
1.1 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, isodate
, pytestCheckHook
, pythonOlder
, pyyaml
, requests
, responses
, setuptools-scm
}:
buildPythonPackage rec {
pname = "pysolcast";
version = "1.0.13";
format = "setuptools";
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "mcaulifn";
repo = "solcast";
rev = "refs/tags/v${version}";
hash = "sha256-peoC6NrenfQYqr1hgPth8pqyTRZb+phD6UQhjnZF92U=";
};
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";
changelog = "https://github.com/mcaulifn/solcast/releases/tag/v${version}";
license = with licenses; [ asl20 ];
maintainers = with maintainers; [ fab ];
};
}