about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/dictdiffer/default.nix
blob: acbc3996fbc6b1f7ab9b748946320155cbf945fb (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
{ lib
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
, pythonOlder
, setuptools-scm
}:

buildPythonPackage rec {
  pname = "dictdiffer";
  version = "0.9.0";
  format = "setuptools";

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "inveniosoftware";
    repo = pname;
    rev = "v${version}";
    hash = "sha256-lQyPs3lQWtsvNPuvvwJUTDzrFaOX5uwGuRHe3yWUheU=";
  };

  nativeBuildInputs = [
    setuptools-scm
  ];

  nativeCheckInputs = [
    pytestCheckHook
  ];

  postPatch = ''
    substituteInPlace setup.py \
      --replace "'pytest-runner>=2.7'," ""
    substituteInPlace pytest.ini \
      --replace ' --isort --pydocstyle --pycodestyle --doctest-glob="*.rst" --doctest-modules --cov=dictdiffer --cov-report=term-missing' ""
  '';

  pythonImportsCheck = [
    "dictdiffer"
  ];

  meta = with lib; {
    description = "Module to diff and patch dictionaries";
    homepage = "https://github.com/inveniosoftware/dictdiffer";
    license = licenses.mit;
    maintainers = with maintainers; [ fab ];
  };
}