about summary refs log tree commit diff
path: root/pkgs/development/python-modules/typish/default.nix
blob: c05518c257f0e7a4b9dc8e238b6bdd745235018b (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
50
51
{ lib
, buildPythonPackage
, fetchFromGitHub
, numpy
, pytestCheckHook
, pythonAtLeast
, pythonOlder
}:

buildPythonPackage rec {
  pname = "typish";
  version = "1.9.3";
  format = "setuptools";

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "ramonhagenaars";
    repo = "typish";
    rev = "refs/tags/v${version}";
    hash = "sha256-LnOg1dVs6lXgPTwRYg7uJ3LCdExYrCxS47UEJxKHhVU=";
  };

  nativeCheckInputs = [
    numpy
    pytestCheckHook
  ];

  disabledTestPaths = [
    # Requires a very old version of nptyping
    # which has a circular dependency on typish
    "tests/functions/test_instance_of.py"
  ];

  disabledTests = lib.optionals (pythonAtLeast "3.11") [
    # https://github.com/ramonhagenaars/typish/issues/32
    "test_get_origin"
  ];

  pythonImportsCheck = [
    "typish"
  ];

  meta = with lib; {
    description = "Python module for checking types of objects";
    homepage = "https://github.com/ramonhagenaars/typish";
    changelog = "https://github.com/ramonhagenaars/typish/releases/tag/v${version}";
    license = licenses.mit;
    maintainers = with maintainers; [ fmoda3 ];
  };
}