depot/third_party/nixpkgs/pkgs/development/python-modules/pyecoforest/default.nix
Default email 5e7c2d6cef Project import generated by Copybara.
GitOrigin-RevId: f99e5f03cc0aa231ab5950a15ed02afec45ed51a
2023-10-09 21:29:22 +02:00

56 lines
1.1 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, httpx
, poetry-core
, pytest-asyncio
, pytestCheckHook
, pythonOlder
, respx
}:
buildPythonPackage rec {
pname = "pyecoforest";
version = "0.3.0";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "pjanuario";
repo = "pyecoforest";
rev = "refs/tags/v${version}";
hash = "sha256-GBt7uHppWLq5nIIVwYsOWmLjWjcwdvJwDE/Gu2KnSIA=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace "--cov=pyecoforest --cov-report=term-missing:skip-covered" ""
'';
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
httpx
];
nativeCheckInputs = [
pytest-asyncio
pytestCheckHook
respx
];
pythonImportsCheck = [
"pyecoforest"
];
meta = with lib; {
description = "Module for interacting with Ecoforest devices";
homepage = "https://github.com/pjanuario/pyecoforest";
changelog = "https://github.com/pjanuario/pyecoforest/blob/${version}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}