3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/pyatmo/default.nix

52 lines
1,017 B
Nix
Raw Normal View History

2019-05-04 22:43:49 +01:00
{ lib
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
, oauthlib
, requests
, requests_oauthlib
, freezegun
, pytestCheckHook
, requests-mock
2019-05-04 22:43:49 +01:00
}:
buildPythonPackage rec {
pname = "pyatmo";
2020-12-05 14:06:44 +00:00
version = "4.2.1";
disabled = pythonOlder "3.7";
2019-05-04 22:43:49 +01:00
src = fetchFromGitHub {
owner = "jabesq";
repo = "netatmo-api-python";
rev = "v${version}";
2020-12-05 14:06:44 +00:00
sha256 = "12lmjhqjn71a358nkpzl3dwgiwmmz4lcv9f0qf69ngznpiirk28m";
2019-05-04 22:43:49 +01:00
};
postPatch = ''
substituteInPlace setup.cfg \
2020-12-05 14:06:44 +00:00
--replace "oauthlib~=3.1.0" "oauthlib" \
--replace "requests~=2.23.0" "requests"
'';
propagatedBuildInputs = [
oauthlib
requests
requests_oauthlib
];
checkInputs = [
freezegun
pytestCheckHook
requests-mock
];
pythonImportsCheck = [ "pyatmo" ];
2019-05-04 22:43:49 +01: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 22:43:49 +01:00
maintainers = with maintainers; [ delroth ];
};
}