about summary refs log tree commit diff
path: root/pkgs/development/python-modules/bidict/default.nix
blob: ffd6f3d153dc611f34e4897b0fa50c65f1144d07 (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
52
53
54
55
56
57
58
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  setuptools,
  hypothesis,
  pytest-xdist,
  pytestCheckHook,
  typing-extensions,
  pythonOlder,
  wheel,
}:

buildPythonPackage rec {
  pname = "bidict";
  version = "0.23.1";
  pyproject = true;

  disabled = pythonOlder "3.8";

  src = fetchFromGitHub {
    owner = "jab";
    repo = "bidict";
    rev = "refs/tags/v${version}";
    hash = "sha256-WE0YaRT4a/byvU2pzcByuf1DfMlOpYA9i0PPrKXsS+M=";
  };

  build-system = [
    setuptools
    wheel
  ];

  nativeCheckInputs = [
    hypothesis
    pytest-xdist
    pytestCheckHook
    typing-extensions
  ];

  # Remove the bundled pytest.ini, which adds options to run additional integration
  # tests that are overkill for our purposes.
  preCheck = ''
    rm pytest.ini
  '';

  pythonImportsCheck = [ "bidict" ];

  meta = with lib; {
    homepage = "https://bidict.readthedocs.io";
    changelog = "https://bidict.readthedocs.io/changelog.html";
    description = "The bidirectional mapping library for Python";
    license = licenses.mpl20;
    maintainers = with maintainers; [
      jab
      jakewaksbaum
    ];
  };
}