summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/simpy/default.nix
blob: c85eb0c4ad81da3c962410294c5cf04e70524d3d (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
{
  lib,
  stdenv,
  buildPythonPackage,
  isPy27,
  fetchPypi,
  setuptools,
  setuptools-scm,
  py,
  pytestCheckHook,
  pythonAtLeast,
}:

buildPythonPackage rec {
  pname = "simpy";
  version = "4.1.1";
  pyproject = true;

  disabled = isPy27;

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-BtB1CniEsR4OjiDOC8fG1O1fF0PUVmlTQNE/3/lQAaY=";
  };

  build-system = [
    setuptools
    setuptools-scm
  ];

  pythonImportsCheck = [ "simpy" ];

  nativeCheckInputs = [
    py
    pytestCheckHook
  ];

  enabledTestPaths = [
    "tests"
  ];

  disabledTests =
    lib.optionals (pythonAtLeast "3.13") [
      # Failing on python >= 3.13
      # FAILED tests/test_exceptions.py::test_exception_chaining - AssertionError: Traceback mismatch
      "test_exception_chaining"
    ]
    ++ lib.optionals stdenv.hostPlatform.isDarwin [
      "test_rt"
      "test_rt_multiple_call"
      "test_rt_slow_sim_no_error"
    ];

  meta = {
    downloadPage = "https://github.com/simpx/simpy";
    homepage = "https://simpy.readthedocs.io/en/${version}/";
    description = "Process-based discrete-event simulation framework based on standard Python";
    license = [ lib.licenses.mit ];
    maintainers = with lib.maintainers; [
      shlevy
    ];
  };
}