1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, setuptools
5, pytestCheckHook
6}:
7
8buildPythonPackage rec {
9 pname = "Cerberus";
10 version = "1.3.4";
11
12 src = fetchFromGitHub {
13 owner = "pyeve";
14 repo = "cerberus";
15 rev = version;
16 sha256 = "03kj15cf1pbd11mxsik96m5w1m6p0fbdc4ia5ihzmq8rz28razpq";
17 };
18
19 propagatedBuildInputs = [
20 setuptools
21 ];
22
23 checkInputs = [
24 pytestCheckHook
25 ];
26
27 preCheck = ''
28 export TESTDIR=$(mktemp -d)
29 cp -R ./cerberus/tests $TESTDIR
30 pushd $TESTDIR
31 '';
32
33 postCheck = ''
34 popd
35 '';
36
37 pythonImportsCheck = [
38 "cerberus"
39 ];
40
41 meta = with lib; {
42 homepage = "http://python-cerberus.org/";
43 description = "Lightweight, extensible schema and data validation tool for Python dictionaries";
44 license = licenses.mit;
45 };
46}