diff --git a/pkgs/development/python-modules/pyatmo/default.nix b/pkgs/development/python-modules/pyatmo/default.nix index e2c6d8e37fdb..5476cda31a18 100644 --- a/pkgs/development/python-modules/pyatmo/default.nix +++ b/pkgs/development/python-modules/pyatmo/default.nix @@ -1,35 +1,37 @@ { lib -, buildPythonPackage -, pythonOlder -, fetchFromGitHub , aiohttp -, oauthlib -, requests -, requests_oauthlib +, buildPythonPackage +, fetchFromGitHub , freezegun +, oauthlib , pytest-asyncio , pytest-mock , pytestCheckHook +, pythonOlder +, requests +, requests_oauthlib , requests-mock +, setuptools-scm }: buildPythonPackage rec { pname = "pyatmo"; - version = "5.2.3"; - disabled = pythonOlder "3.7"; + version = "6.0.0"; + + disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "jabesq"; repo = "pyatmo"; rev = "v${version}"; - sha256 = "1w9rhh85z9m3c4rbz6zxlrxglsm5sk5d6796dsj1p1l3b3ad476z"; + sha256 = "sha256-PFVa2koLaoiaZ9uqSeFwLy/nVHCQBOlRXNsRmgXrWIo="; }; - postPatch = '' - substituteInPlace setup.cfg \ - --replace "oauthlib~=3.1" "oauthlib" \ - --replace "requests~=2.24" "requests" - ''; + SETUPTOOLS_SCM_PRETEND_VERSION = version; + + nativeBuildInputs = [ + setuptools-scm + ]; propagatedBuildInputs = [ aiohttp @@ -46,12 +48,18 @@ buildPythonPackage rec { requests-mock ]; + postPatch = '' + substituteInPlace setup.cfg \ + --replace "oauthlib~=3.1" "oauthlib" \ + --replace "requests~=2.24" "requests" + ''; + pythonImportsCheck = [ "pyatmo" ]; meta = with lib; { description = "Simple API to access Netatmo weather station data"; + homepage = "https://github.com/jabesq/pyatmo"; license = licenses.mit; - homepage = "https://github.com/jabesq/netatmo-api-python"; maintainers = with maintainers; [ delroth ]; }; }