depot/third_party/nixpkgs/pkgs/development/python-modules/aiowaqi/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

64 lines
1.2 KiB
Nix

{
lib,
aiohttp,
aresponses,
buildPythonPackage,
fetchFromGitHub,
poetry-core,
pytest-asyncio,
pytestCheckHook,
pythonOlder,
syrupy,
yarl,
}:
buildPythonPackage rec {
pname = "aiowaqi";
version = "3.0.1";
pyproject = true;
disabled = pythonOlder "3.11";
src = fetchFromGitHub {
owner = "joostlek";
repo = "python-waqi";
rev = "refs/tags/v${version}";
hash = "sha256-+4l820FGQI66GGr+KGEeDmPUFwRrMNvYFJuSouesakY=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace "--cov" ""
'';
nativeBuildInputs = [ poetry-core ];
propagatedBuildInputs = [
aiohttp
yarl
];
nativeCheckInputs = [
aresponses
pytest-asyncio
pytestCheckHook
syrupy
];
pythonImportsCheck = [ "aiowaqi" ];
disabledTests = [
# Upstream mocking fails
"test_search"
];
pytestFlagsArray = [ "--snapshot-update" ];
meta = with lib; {
description = "Module to interact with the WAQI API";
homepage = "https://github.com/joostlek/python-waqi";
changelog = "https://github.com/joostlek/python-waqi/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}