about summary refs log tree commit diff
path: root/pkgs/development/python-modules/pytest-shutil/default.nix
blob: 480c15b87c361b238e3b8b6fd7c8773bd399abc8 (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
59
60
61
62
63
64
65
66
67
68
69
{ lib
, isPyPy
, buildPythonPackage
, fetchPypi

# build
, pytest

# runtime
, setuptools-git
, mock
, path
, execnet
, termcolor
, six

# tests
, cmdline
, pytestCheckHook
 }:

buildPythonPackage rec {
  pname = "pytest-shutil";
  version = "1.7.0";
  format = "setuptools";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-2BZSYd5251CFBcNB2UwCsRPclj8nRUOrynTb+r0CEmE=";
  };

  postPatch = ''
    substituteInPlace setup.py \
      --replace "contextlib2" 'contextlib2;python_version<"3"' \
      --replace "path.py" "path"
  '';

  buildInputs = [
    pytest
  ];

  propagatedBuildInputs = [
    setuptools-git
    mock
    path
    execnet
    termcolor
    six
  ];

  nativeCheckInputs = [
    cmdline
    pytestCheckHook
  ];

  disabledTests = [
    "test_pretty_formatter"
  ] ++ lib.optionals isPyPy [
    "test_run"
    "test_run_integration"
  ];

  meta = with lib; {
    description = "A goodie-bag of unix shell and environment tools for py.test";
    homepage = "https://github.com/manahl/pytest-plugins";
    maintainers = with maintainers; [ ryansydnor ];
    license = licenses.mit;
  };
}