summary refs log tree commit diff
path: root/pkgs/development/python-modules/typesystem/default.nix
blob: c278680404ba06e1ecdf71229ccb888d952dc20f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{ lib
, buildPythonPackage
, fetchFromGitHub
, isPy27
, pytestCheckHook
, pytestcov
, jinja2
, pyyaml
}:

buildPythonPackage rec {
  pname = "typesystem";
  version = "0.2.4";
  disabled = isPy27;

  src = fetchFromGitHub {
    owner = "encode";
    repo = pname;
    rev = version;
    sha256 = "1k0jwcky17zwaz2vx4x2zbsnp270g4mgn7kx5bpl8jgx76qmsnba";
  };

  propagatedBuildInputs = [
    jinja2
    pyyaml
  ];

  checkInputs = [
    pytestCheckHook
    pytestcov
  ];

  disabledTests = [
    # https://github.com/encode/typesystem/issues/102. cosmetic issue where python3.8 changed
    # the default string formatting of regular expression flags which breaks test assertion
    "test_to_json_schema_complex_regular_expression"
  ];
  disabledTestPaths = [
    # for some reason jinja2 not picking up forms directory (1% of tests)
    "tests/test_forms.py"
  ];

  meta = with lib; {
    description = "A type system library for Python";
    homepage = "https://github.com/encode/typesystem";
    license = licenses.bsd3;
    maintainers = [ maintainers.costrouc ];
  };
}