1{
2 lib,
3 stdenv,
4 buildPythonPackage,
5 isPy27,
6 fetchPypi,
7 setuptools,
8 setuptools-scm,
9 py,
10 pytestCheckHook,
11 pythonAtLeast,
12}:
13
14buildPythonPackage rec {
15 pname = "simpy";
16 version = "4.1.1";
17 pyproject = true;
18
19 disabled = isPy27;
20
21 src = fetchPypi {
22 inherit pname version;
23 hash = "sha256-BtB1CniEsR4OjiDOC8fG1O1fF0PUVmlTQNE/3/lQAaY=";
24 };
25
26 build-system = [
27 setuptools
28 setuptools-scm
29 ];
30
31 pythonImportsCheck = [ "simpy" ];
32
33 nativeCheckInputs = [
34 py
35 pytestCheckHook
36 ];
37
38 enabledTestPaths = [
39 "tests"
40 ];
41
42 disabledTests =
43 lib.optionals (pythonAtLeast "3.13") [
44 # Failing on python >= 3.13
45 # FAILED tests/test_exceptions.py::test_exception_chaining - AssertionError: Traceback mismatch
46 "test_exception_chaining"
47 ]
48 ++ lib.optionals stdenv.hostPlatform.isDarwin [
49 "test_rt"
50 "test_rt_multiple_call"
51 "test_rt_slow_sim_no_error"
52 ];
53
54 meta = {
55 downloadPage = "https://github.com/simpx/simpy";
56 homepage = "https://simpy.readthedocs.io/en/${version}/";
57 description = "Process-based discrete-event simulation framework based on standard Python";
58 license = [ lib.licenses.mit ];
59 maintainers = with lib.maintainers; [
60 shlevy
61 ];
62 };
63}