python3Packages.net2grid: init at 2.0.0

This commit is contained in:
Fabian Affolter 2022-02-15 12:25:25 +01:00
parent c3a5c49429
commit b9ca873473
2 changed files with 60 additions and 0 deletions

View file

@ -0,0 +1,58 @@
{ lib
, aiohttp
, aresponses
, buildPythonPackage
, fetchFromGitHub
, poetry-core
, pytest-asyncio
, pytestCheckHook
, pythonOlder
, yarl
}:
buildPythonPackage rec {
pname = "net2grid";
version = "2.0.0";
format = "pyproject";
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "klaasnicolaas";
repo = "python-net2grid";
rev = "v${version}";
hash = "sha256-2hjWQaktx7XUS7gf7A+9QNSZSujyVZUka/SwEnEu2dg=";
};
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
aiohttp
yarl
];
checkInputs = [
aresponses
pytest-asyncio
pytestCheckHook
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace '"0.0.0"' '"${version}"' \
--replace 'addopts = "--cov"' ""
'';
pythonImportsCheck = [
"net2grid"
];
meta = with lib; {
description = "Module for interacting with NET2GRID devices";
homepage = "https://github.com/klaasnicolaas/python-net2grid";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}

View file

@ -5380,6 +5380,8 @@ in {
nestedtext = callPackage ../development/python-modules/nestedtext { };
net2grid = callPackage ../development/python-modules/net2grid { };
netaddr = callPackage ../development/python-modules/netaddr { };
netcdf4 = callPackage ../development/python-modules/netcdf4 { };