pythonPackages.yeelight: 0.5.3 -> 0.5.4

Use pytestCheckhook for testing.
This commit is contained in:
Martin Weinelt 2020-10-09 17:10:28 +02:00
parent 5a9a3143fc
commit 657c387464
No known key found for this signature in database
GPG Key ID: BD4AA0528F63F17E

View File

@ -1,17 +1,38 @@
{ stdenv, fetchPypi, buildPythonPackage, future, enum-compat }:
{ lib
, fetchgit
, buildPythonPackage
, pythonOlder
, enum-compat
, future
, ifaddr
, mock
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "yeelight";
version = "0.5.3";
version = "0.5.4";
src = fetchPypi {
inherit pname version;
sha256 = "8d49846f0cede1e312cbcd1d0e44c42073910bbcadb31b87ce2a7d24dea3af38";
src = fetchgit {
url = "https://gitlab.com/stavros/python-yeelight.git";
rev = "119faeff0d4f9de8c7f6d0580bdecc1c79bcdaea"; # v0.5.4 wasn't tagged
sha256 = "0j2c5pzd3kny7ghr9q7xn9vs8dffvyzz5igaavvvd04w7aph29sy";
};
propagatedBuildInputs = [ future enum-compat ];
propagatedBuildInputs = [
future
ifaddr
] ++ lib.optional (pythonOlder "3.4") enum-compat;
meta = with stdenv.lib; {
checkInputs = [
pytestCheckHook
] ++ lib.optional (pythonOlder "3.3") mock;
pytestFlagsArray = [ "yeelight/tests.py" ];
pythonImportsCheck = [ "yeelight" ];
meta = with lib; {
description = "A Python library for controlling YeeLight RGB bulbs";
homepage = "https://gitlab.com/stavros/python-yeelight/";
license = licenses.asl20;