nixpkgs/pkgs/development/python-modules/pyatmo/default.nix

58 lines
1.1 KiB
Nix
Raw Normal View History

2019-05-04 21:43:49 +00:00
{ lib
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
2021-06-02 23:45:39 +00:00
, aiohttp
, oauthlib
, requests
, requests_oauthlib
, freezegun
2021-06-02 23:45:39 +00:00
, pytest-asyncio
, pytest-mock
, pytestCheckHook
, requests-mock
2019-05-04 21:43:49 +00:00
}:
buildPythonPackage rec {
pname = "pyatmo";
2021-08-03 20:12:26 +00:00
version = "5.2.3";
disabled = pythonOlder "3.7";
2019-05-04 21:43:49 +00:00
src = fetchFromGitHub {
owner = "jabesq";
2021-01-24 01:50:04 +00:00
repo = "pyatmo";
rev = "v${version}";
2021-08-03 20:12:26 +00:00
sha256 = "1w9rhh85z9m3c4rbz6zxlrxglsm5sk5d6796dsj1p1l3b3ad476z";
2019-05-04 21:43:49 +00:00
};
postPatch = ''
substituteInPlace setup.cfg \
2021-01-24 01:50:04 +00:00
--replace "oauthlib~=3.1" "oauthlib" \
--replace "requests~=2.24" "requests"
'';
propagatedBuildInputs = [
2021-06-02 23:45:39 +00:00
aiohttp
oauthlib
requests
requests_oauthlib
];
checkInputs = [
freezegun
2021-06-02 23:45:39 +00:00
pytest-asyncio
pytest-mock
pytestCheckHook
requests-mock
];
pythonImportsCheck = [ "pyatmo" ];
2019-05-04 21:43:49 +00:00
meta = with lib; {
description = "Simple API to access Netatmo weather station data";
license = licenses.mit;
homepage = "https://github.com/jabesq/netatmo-api-python";
2019-05-04 21:43:49 +00:00
maintainers = with maintainers; [ delroth ];
};
}