python312Packages.simpy: modernise, unbreak with Python >= 3.13

This commit is contained in:
Pol Dellaiera
2025-04-01 18:08:37 +02:00
parent 0a816e162f
commit 4da503af1a

View File

@@ -1,12 +1,14 @@
{
buildPythonPackage,
fetchPypi,
isPy27,
lib,
stdenv,
buildPythonPackage,
isPy27,
fetchPypi,
setuptools,
setuptools-scm,
py,
pytestCheckHook,
pythonAtLeast,
}:
buildPythonPackage rec {
@@ -21,22 +23,40 @@ buildPythonPackage rec {
hash = "sha256-BtB1CniEsR4OjiDOC8fG1O1fF0PUVmlTQNE/3/lQAaY=";
};
nativeBuildInputs = [
build-system = [
setuptools
setuptools-scm
];
pythonImportsCheck = [ "simpy" ];
nativeCheckInputs = [
py
pytestCheckHook
];
meta = with lib; {
pytestFlags = [
"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 = [ licenses.mit ];
maintainers = with maintainers; [
license = [ lib.licenses.mit ];
maintainers = with lib.maintainers; [
dmrauh
shlevy
];