depot/third_party/nixpkgs/pkgs/development/python-modules/pyatmo/default.nix
Default email e7ec2969af Project import generated by Copybara.
GitOrigin-RevId: 9b19f5e77dd906cb52dade0b7bd280339d2a1f3d
2024-01-13 09:15:51 +01:00

67 lines
1.2 KiB
Nix

{ lib
, aiohttp
, buildPythonPackage
, fetchFromGitHub
, oauthlib
, pytest-asyncio
, pytest-mock
, pytestCheckHook
, pythonOlder
, requests
, requests-oauthlib
, requests-mock
, setuptools-scm
, time-machine
}:
buildPythonPackage rec {
pname = "pyatmo";
version = "8.0.2";
pyproject = true;
disabled = pythonOlder "3.10";
src = fetchFromGitHub {
owner = "jabesq";
repo = "pyatmo";
rev = "refs/tags/v${version}";
hash = "sha256-AKpDXfNF2t/3F4SmMWIgfkxHgcJobYs225gIeJ31l6k=";
};
postPatch = ''
substituteInPlace setup.cfg \
--replace "oauthlib~=3.1" "oauthlib" \
--replace "requests~=2.24" "requests"
'';
nativeBuildInputs = [
setuptools-scm
];
propagatedBuildInputs = [
aiohttp
oauthlib
requests
requests-oauthlib
];
nativeCheckInputs = [
pytest-asyncio
pytest-mock
pytestCheckHook
requests-mock
time-machine
];
pythonImportsCheck = [
"pyatmo"
];
meta = with lib; {
description = "Simple API to access Netatmo weather station data";
homepage = "https://github.com/jabesq/pyatmo";
changelog = "https://github.com/jabesq/pyatmo/blob/v${version}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ delroth ];
};
}