1{ buildPythonPackage
2, enum34
3, fetchFromGitHub
4, flit-core
5, isPy27
6, lib
7, pathlib
8, pyyaml
9, pytestCheckHook
10}:
11
12buildPythonPackage rec {
13 pname = "confuse";
14 version = "1.5.0";
15 format = "flit";
16
17 src = fetchFromGitHub {
18 owner = "beetbox";
19 repo = pname;
20 rev = "v${version}";
21 sha256 = "1kvilxhjifvz6ra64jadf9jiwphrah5rcb9ryq0v7w1dywgn4qp7";
22 };
23
24 nativeBuildInputs = [
25 flit-core
26 ];
27
28 propagatedBuildInputs = [
29 pyyaml
30 ] ++ lib.optionals isPy27 [
31 enum34
32 pathlib
33 ] ;
34
35 checkInputs = [
36 pytestCheckHook
37 ];
38
39 pythonImportsCheck = [ "confuse" ];
40
41 meta = with lib; {
42 description = "Python configuration library for Python that uses YAML";
43 homepage = "https://github.com/beetbox/confuse";
44 license = licenses.mit;
45 maintainers = with maintainers; [ lovesegfault ];
46 };
47}