Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 isPyPy, 4 buildPythonPackage, 5 pytest-fixture-config, 6 fetchpatch, 7 8 # build-time 9 setuptools, 10 setuptools-git, 11 12 # runtime 13 pytest, 14 mock, 15 path, 16 execnet, 17 termcolor, 18 six, 19 20 # tests 21 pytestCheckHook, 22}: 23 24buildPythonPackage rec { 25 pname = "pytest-shutil"; 26 inherit (pytest-fixture-config) version src; 27 pyproject = true; 28 29 sourceRoot = "${src.name}/pytest-shutil"; 30 31 # imp was removed in Python 3.12 32 patches = [ 33 (fetchpatch { 34 name = "stop-using-imp.patch"; 35 url = "https://build.opensuse.org/public/source/openSUSE:Factory/python-pytest-shutil/stop-using-imp.patch?rev=10"; 36 hash = "sha256-L8tXoQ9q8o6aP3TpJY/sUVVbUd/ebw0h6de6dBj1WNY="; 37 stripLen = 1; 38 }) 39 ]; 40 41 build-system = [ 42 setuptools 43 setuptools-git 44 ]; 45 46 buildInputs = [ pytest ]; 47 48 dependencies = [ 49 mock 50 path 51 execnet 52 termcolor 53 six 54 ]; 55 56 nativeCheckInputs = [ pytestCheckHook ]; 57 58 disabledTests = 59 [ "test_pretty_formatter" ] 60 ++ lib.optionals isPyPy [ 61 "test_run" 62 "test_run_integration" 63 ]; 64 65 meta = with lib; { 66 description = "Goodie-bag of unix shell and environment tools for py.test"; 67 homepage = "https://github.com/manahl/pytest-plugins"; 68 maintainers = with maintainers; [ ryansydnor ]; 69 license = licenses.mit; 70 }; 71}