python312Packages.python-fx: 0.3.1 -> 0.3.2, enable tests

This commit is contained in:
Julius Michaelis
2024-08-13 09:48:06 +09:00
parent 1d215eb380
commit 7073019f13
@@ -1,5 +1,6 @@
{
lib,
stdenv,
antlr4-python3-runtime,
asciimatics,
buildPythonPackage,
@@ -30,7 +31,7 @@
buildPythonPackage rec {
pname = "python-fx";
version = "0.3.1";
version = "0.3.2";
format = "setuptools";
disabled = pythonOlder "3.8";
@@ -39,12 +40,13 @@ buildPythonPackage rec {
owner = "cielong";
repo = "pyfx";
rev = "refs/tags/v${version}";
hash = "sha256-BXKH3AlYMNbMREW5Qx72PrbuZdXlmVS+knWWu/y9PsA=";
hash = "sha256-Q5ihWnoa7nf4EkrY4SgrwjaNvTva4RdW9GRbnbsPXPc=";
};
postPatch = ''
rm src/pyfx/model/common/jsonpath/*.{g4,interp,tokens}
antlr -Dlanguage=Python3 -visitor -o src/pyfx/model/common/jsonpath/ *.g4
rm src/pyfx/model/common/jsonpath/*.py # upstream checks in generated files, remove to ensure they were regenerated
antlr -Dlanguage=Python3 -visitor src/pyfx/model/common/jsonpath/*.g4
rm src/pyfx/model/common/jsonpath/*.{g4,interp,tokens} # no need to install
'';
pythonRelaxDeps = true;
@@ -81,13 +83,10 @@ buildPythonPackage rec {
parameterized
];
# antlr4 issue prevents us from running the tests
# https://github.com/antlr/antlr4/issues/4041
doCheck = false;
# FAILED tests/test_event_loops.py::TwistedEventLoopTest::test_run - AssertionError: 'callback called with future outcome: True' not found in ['...
doCheck = !stdenv.isDarwin;
# pythonImportsCheck = [
# "pyfx"
# ];
pythonImportsCheck = [ "pyfx" ];
meta = with lib; {
description = "Module to view JSON in a TUI";