Merge pull request #109483 from fabaff/voluptuous-serialize

python3Packages.voluptuous-serialize: enable tests
This commit is contained in:
Martin Weinelt 2021-01-17 10:38:41 +01:00 committed by GitHub
commit b6d88a4c67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,10 @@
{ lib, stdenv, buildPythonPackage, isPy3k, fetchPypi, voluptuous, pytest }:
{ lib
, buildPythonPackage
, fetchFromGitHub
, isPy3k
, pytestCheckHook
, voluptuous
}:
buildPythonPackage rec {
pname = "voluptuous-serialize";
@ -6,28 +12,24 @@ buildPythonPackage rec {
disabled = !isPy3k;
src = fetchPypi {
inherit pname version;
sha256 = "1r7avibzf009h5rlh7mbh1fc01daligvi2axjn5qxh810g5igfn6";
src = fetchFromGitHub {
owner = "home-assistant-libs";
repo = pname;
rev = version;
sha256 = "1km2y1xaagkdvsy3bmi1sc040x5yyfdw6llmwdv9z8nz67m9v1ya";
};
propagatedBuildInputs = [
propagatedBuildInputs = [ voluptuous ];
checkInputs = [
pytestCheckHook
voluptuous
];
checkInputs = [
pytest
];
checkPhase = ''
py.test
'';
# no tests in PyPI tarball
doCheck = false;
pythonImportsCheck = [ "voluptuous_serialize" ];
meta = with lib; {
homepage = "https://github.com/balloob/voluptuous-serialize";
homepage = "https://github.com/home-assistant-libs/voluptuous-serialize";
license = licenses.asl20;
description = "Convert Voluptuous schemas to dictionaries so they can be serialized";
maintainers = with maintainers; [ etu ];