Skip to content

Commit

Permalink
python312Packages.pydot: 2.0.0 -> 3.0.2 (#349805)
Browse files Browse the repository at this point in the history
  • Loading branch information
dotlambda authored Nov 25, 2024
2 parents 6de3dec + e872fea commit 38eefea
Showing 1 changed file with 16 additions and 23 deletions.
39 changes: 16 additions & 23 deletions pkgs/development/python-modules/pydot/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,37 @@
lib,
buildPythonPackage,
fetchPypi,
setuptools,
substituteAll,
graphviz,
pytestCheckHook,
chardet,
parameterized,
pythonOlder,
pyparsing,
}:

buildPythonPackage rec {
pname = "pydot";
version = "2.0.0";
format = "setuptools";
version = "3.0.2";
pyproject = true;

disabled = pythonOlder "3.5";
disabled = pythonOlder "3.8";

src = fetchPypi {
inherit pname version;
hash = "sha256-YCRq8hUSP6Bi8hzXkb5n3aI6bygN8J9okZ5jeh5PMjU=";
hash = "sha256-kYDaVAtRs6oJ+/gRQLPt++IxXXeOhYmn0KSmnEEzK64=";
};

propagatedBuildInputs = [ pyparsing ];
build-system = [
setuptools
];

dependencies = [ pyparsing ];

nativeCheckInputs = [
chardet
parameterized
pytestCheckHook
];

Expand All @@ -36,29 +43,15 @@ buildPythonPackage rec {
})
];

postPatch = ''
# test_graphviz_regression_tests also fails upstream: https://github.com/pydot/pydot/pull/198
substituteInPlace test/pydot_unittest.py \
--replace "test_graphviz_regression_tests" "no_test_graphviz_regression_tests" \
# Patch path for pytestCheckHook
substituteInPlace test/pydot_unittest.py \
--replace "shapefile_dir = os.path.join(test_dir, 'from-past-to-future')" "shapefile_dir = 'test/from-past-to-future'" \
--replace "path = os.path.join(test_dir, TESTS_DIR_1)" "path = os.path.join('test/', TESTS_DIR_1)"
'';

pytestFlagsArray = [ "test/pydot_unittest.py" ];

disabledTests = [
# broken, fixed after 2.0.0
"test_graph_with_shapefiles"
];
pytestFlagsArray = [ "test/test_pydot.py" ];

pythonImportsCheck = [ "pydot" ];

meta = with lib; {
meta = {
description = "Allows to create both directed and non directed graphs from Python";
homepage = "https://github.com/erocarrera/pydot";
license = licenses.mit;
changelog = "https://github.com/pydot/pydot/blob/v${version}/ChangeLog";
license = lib.licenses.mit;
maintainers = [ ];
};
}

0 comments on commit 38eefea

Please sign in to comment.