depot/third_party/nixpkgs/pkgs/development/python-modules/pyopenweathermap/default.nix
Default email 98eb3e9ef5 Project import generated by Copybara.
GitOrigin-RevId: 00d80d13810dbfea8ab4ed1009b09100cca86ba8
2024-07-01 15:47:52 +00:00

52 lines
993 B
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
# build-system
poetry-core,
# dependencies
aiohttp,
# tests
pytest-asyncio,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "pyopenweathermap";
version = "0.1.1";
pyproject = true;
src = fetchFromGitHub {
owner = "freekode";
repo = "pyopenweathermap";
# https://github.com/freekode/pyopenweathermap/issues/2
rev = "refs/tags/v${version}";
hash = "sha256-OGalKlZP4pKKWKypjM5nVesvFAGLgvvRjMWzrEIp+VQ=";
};
build-system = [ poetry-core ];
dependencies = [ aiohttp ];
nativeCheckInputs = [
pytest-asyncio
pytestCheckHook
];
pytestFlagsArray = [
"-m"
"'not network'"
];
pythonImportsCheck = [ "pyopenweathermap" ];
meta = with lib; {
description = "Python library for OpenWeatherMap API for Home Assistant";
homepage = "https://github.com/freekode/pyopenweathermap";
license = licenses.mit;
maintainers = with maintainers; [ hexa ];
};
}