1{
2 lib,
3 buildPythonPackage,
4 cmdline,
5 importlib-metadata,
6 mock,
7 pytestCheckHook,
8 pytest,
9 pytest-fixture-config,
10 pytest-shutil,
11 setuptools,
12 virtualenv,
13}:
14
15buildPythonPackage {
16 pname = "pytest-virtualenv";
17 inherit (pytest-fixture-config) version src patches;
18 pyproject = true;
19
20 postPatch = ''
21 cd pytest-virtualenv
22 '';
23
24 build-system = [ setuptools ];
25
26 buildInputs = [ pytest ];
27
28 dependencies = [
29 importlib-metadata
30 pytest-fixture-config
31 pytest-shutil
32 virtualenv
33 ];
34
35 nativeCheckInputs = [
36 cmdline
37 mock
38 pytestCheckHook
39 ];
40
41 # Don't run integration tests
42 disabledTestPaths = [ "tests/integration/*" ];
43
44 meta = with lib; {
45 description = "Create a Python virtual environment in your test that cleans up on teardown. The fixture has utility methods to install packages and list what’s installed";
46 homepage = "https://github.com/manahl/pytest-plugins";
47 license = licenses.mit;
48 maintainers = with maintainers; [ ryansydnor ];
49 };
50}