From 139ba48b97da3e3dcbd7bc4bd946e89fb711ec83 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 7 Apr 2022 05:22:48 +0200 Subject: [PATCH] python3Packages.pure-python-adb: split off async requirements --- .../pure-python-adb/default.nix | 28 +++++++++++++++---- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/pure-python-adb/default.nix b/pkgs/development/python-modules/pure-python-adb/default.nix index c562f20e5ec..d6e8bbdf683 100644 --- a/pkgs/development/python-modules/pure-python-adb/default.nix +++ b/pkgs/development/python-modules/pure-python-adb/default.nix @@ -1,4 +1,10 @@ -{ aiofiles, buildPythonPackage, fetchPypi, lib, pythonOlder }: +{ aiofiles +, buildPythonPackage +, fetchPypi +, lib +, pythonOlder +, pytestCheckHook +}: buildPythonPackage rec { pname = "pure-python-adb"; @@ -11,11 +17,21 @@ buildPythonPackage rec { sha256 = "0kdr7w2fhgjpcf1k3l6an9im583iqkr6v8hb4q1zw30nh3bqkk0f"; }; - propagatedBuildInputs = [ aiofiles ]; - # Disable tests as they require docker, docker-compose and a dedicated - # android emulator - doCheck = false; - pythonImportsCheck = [ "ppadb.client" "ppadb.client_async" ]; + passthru.extras-require = { + async = [ + aiofiles + ]; + }; + + checkInputs = [ + pytestCheckHook + ] + ++ passthru.extras-require.async; + + pythonImportsCheck = [ + "ppadb.client" + "ppadb.client_async" + ]; meta = with lib; { description = "Pure python implementation of the adb client";