summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/pytest-services/default.nix
blob: c9b7d27c89bf5cc7560da01997b7113e819c5e63 (plain)
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
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  psutil,
  pylibmc,
  pytest,
  pytestCheckHook,
  requests,
  setuptools-scm,
  toml,
  mysqlclient,
  zc-lockfile,
}:

buildPythonPackage rec {
  pname = "pytest-services";
  version = "2.2.2";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "pytest-dev";
    repo = "pytest-services";
    tag = "v${version}";
    hash = "sha256-kWgqb7+3/hZKUz7B3PnfxHZq6yU3JUeJ+mruqrMD/NE=";
  };

  build-system = [
    setuptools-scm
    toml
  ];

  buildInputs = [ pytest ];

  dependencies = [
    requests
    psutil
    zc-lockfile
  ];

  nativeCheckInputs = [
    mysqlclient
    pylibmc
    pytestCheckHook
  ];

  pythonImportsCheck = [ "pytest_services" ];

  disabledTests = [
    # Tests require binaries and additional parts
    "test_memcached"
    "test_mysql"
    "test_xvfb"
  ];

  # Tests use sockets
  __darwinAllowLocalNetworking = true;

  meta = {
    description = "Services plugin for pytest testing framework";
    homepage = "https://github.com/pytest-dev/pytest-services";
    changelog = "https://github.com/pytest-dev/pytest-services/blob/${src.tag}/CHANGES.rst";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ dotlambda ];
  };
}