diff --git a/pkgs/development/python-modules/devolo-home-control-api/default.nix b/pkgs/development/python-modules/devolo-home-control-api/default.nix index 1e388fd3a117..db26b089e419 100644 --- a/pkgs/development/python-modules/devolo-home-control-api/default.nix +++ b/pkgs/development/python-modules/devolo-home-control-api/default.nix @@ -2,28 +2,26 @@ , aiohttp , buildPythonPackage , fetchFromGitHub -, pytestCheckHook -, pytest-cov , pytest-mock +, pytestCheckHook +, pythonOlder , requests -, zeroconf , websocket_client -, pytest-runner +, zeroconf }: buildPythonPackage rec { pname = "devolo-home-control-api"; - version = "0.16.0"; + version = "0.17.0"; + disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = "2Fake"; repo = "devolo_home_control_api"; rev = "v${version}"; - sha256 = "19zzdbx0dxlm8pq0yk00nn9gqqblgpp16fgl7z6a98hsa6459zzb"; + sha256 = "sha256-g82YmlxlBdyNn7KPU+k+J3/P7ABWMMdLXUpXWnCkdpM="; }; - nativeBuildInputs = [ pytest-runner ]; - propagatedBuildInputs = [ requests zeroconf @@ -32,12 +30,22 @@ buildPythonPackage rec { checkInputs = [ pytestCheckHook - pytest-cov pytest-mock ]; + postPatch = '' + # setup.py is not able to detect the version with setuptools_scm + substituteInPlace setup.py \ + --replace "setuptools_scm" "" \ + --replace 'use_scm_version=True' 'use_scm_version="${version}"' + ''; + # Disable test that requires network access - disabledTests = [ "test__on_pong" ]; + disabledTests = [ + "test__on_pong" + "TestMprm" + ]; + pythonImportsCheck = [ "devolo_home_control_api" ]; meta = with lib; {