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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

69 lines
1.2 KiB
Nix
Raw Normal View History

2019-05-04 21:43:49 +00:00
{ lib
2021-09-26 10:29:48 +00:00
, aiohttp
2019-05-04 21:43:49 +00:00
, buildPythonPackage
, fetchFromGitHub
, freezegun
2021-09-26 10:29:48 +00:00
, oauthlib
2021-06-02 23:45:39 +00:00
, pytest-asyncio
, pytest-mock
, pytestCheckHook
2021-09-26 10:29:48 +00:00
, pythonOlder
, requests
, requests_oauthlib
, requests-mock
2021-09-26 10:29:48 +00:00
, setuptools-scm
2019-05-04 21:43:49 +00:00
}:
buildPythonPackage rec {
pname = "pyatmo";
version = "6.2.4";
2021-11-19 22:14:29 +00:00
format = "setuptools";
2021-09-26 10:29:48 +00:00
disabled = pythonOlder "3.8";
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}";
sha256 = "sha256-VXkQByaNA02fwBO2yuf7w1ZF/oJwd/h21de1EQlCu2U=";
2019-05-04 21:43:49 +00:00
};
2021-09-26 10:29:48 +00:00
SETUPTOOLS_SCM_PRETEND_VERSION = version;
nativeBuildInputs = [
setuptools-scm
];
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
];
2021-09-26 10:29:48 +00:00
postPatch = ''
substituteInPlace setup.cfg \
--replace "oauthlib~=3.1" "oauthlib" \
--replace "requests~=2.24" "requests"
'';
2021-11-19 22:14:29 +00:00
pythonImportsCheck = [
"pyatmo"
];
2019-05-04 21:43:49 +00:00
meta = with lib; {
description = "Simple API to access Netatmo weather station data";
2021-09-26 10:29:48 +00:00
homepage = "https://github.com/jabesq/pyatmo";
2019-05-04 21:43:49 +00:00
license = licenses.mit;
maintainers = with maintainers; [ delroth ];
};
}