summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/persist-queue/default.nix
blob: 4a34e6e7eb723d985381e8978f675ce91d24c8ad (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
{ lib
, buildPythonPackage
, fetchPypi
, pythonOlder
, msgpack
, nose2
}:

buildPythonPackage rec {
  pname = "persist-queue";
  version = "0.8.0";

  src = fetchPypi {
    inherit pname version;
    sha256 = "sha256-vapNz8SyCpzh9cttoxFrbLj+N1J9mR/SQoVu8szNIY4=";
  };

  disabled = pythonOlder "3.6";

  nativeCheckInputs = [
    msgpack
    nose2
  ];

  checkPhase = ''
    runHook preCheck

    # Don't run MySQL tests, as they require a MySQL server running
    rm persistqueue/tests/test_mysqlqueue.py

    nose2

    runHook postCheck
  '';

  pythonImportsCheck = [ "persistqueue" ];

  meta = with lib; {
    description = "Thread-safe disk based persistent queue in Python";
    homepage = "https://github.com/peter-wangxu/persist-queue";
    license = licenses.bsd3;
    maintainers = with maintainers; [ huantian ];
  };
}