From 49d00dd6d6461587f51bbf2fae4c233b0e092634 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 26 Aug 2023 10:42:52 +0200 Subject: [PATCH] python311Packages.anytree: 2.8.0 -> 2.9.0 Diff: https://github.com/c0fec0de/anytree/compare/refs/tags/2.8.0...2.9.0 Changelog: https://github.com/c0fec0de/anytree/releases/tag/2.9.0 --- .../python-modules/anytree/default.nix | 51 +++++++++++-------- 1 file changed, 30 insertions(+), 21 deletions(-) diff --git a/pkgs/development/python-modules/anytree/default.nix b/pkgs/development/python-modules/anytree/default.nix index d49b22349639..a83d8748d477 100644 --- a/pkgs/development/python-modules/anytree/default.nix +++ b/pkgs/development/python-modules/anytree/default.nix @@ -1,24 +1,28 @@ { lib , buildPythonPackage -, fetchPypi -, pythonOlder -, substituteAll -, six -, withGraphviz ? true -, graphviz +, fetchFromGitHub , fontconfig -# Tests +, graphviz +, poetry-core , pytestCheckHook -, nose +, pythonOlder +, six +, substituteAll +, withGraphviz ? true }: buildPythonPackage rec { pname = "anytree"; - version = "2.8.0"; + version = "2.9.0"; + format = "pyproject"; - src = fetchPypi { - inherit pname version; - sha256 = "3f0f93f355a91bc3e6245319bf4c1d50e3416cc7a35cc1133c1ff38306bbccab"; + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "c0fec0de"; + repo = "anytree"; + rev = "refs/tags/${version}"; + hash = "sha256-e7mmOOvrZuMCcyUg74YLLXGzkb5nCtuYmhNzAbY65gg="; }; patches = lib.optionals withGraphviz [ @@ -28,30 +32,35 @@ buildPythonPackage rec { }) ]; + nativeBuildInputs = [ + poetry-core + ]; + propagatedBuildInputs = [ six ]; - # tests print “Fontconfig error: Cannot load default config file” + nativeCheckInputs = [ + pytestCheckHook + ]; + + # Tests print “Fontconfig error: Cannot load default config file” preCheck = lib.optionalString withGraphviz '' export FONTCONFIG_FILE=${fontconfig.out}/etc/fonts/fonts.conf ''; - # circular dependency anytree → graphviz → pango → glib → gtk-doc → anytree + # Circular dependency anytree → graphviz → pango → glib → gtk-doc → anytree doCheck = withGraphviz; - nativeCheckInputs = [ pytestCheckHook nose ]; - - pytestFlagsArray = lib.optionals (pythonOlder "3.4") [ - # Use enums, which aren't available pre-python3.4 - "--ignore=tests/test_resolver.py" - "--ignore=tests/test_search.py" + pythonImportsCheck = [ + "anytree" ]; meta = with lib; { description = "Powerful and Lightweight Python Tree Data Structure"; homepage = "https://github.com/c0fec0de/anytree"; + changelog = "https://github.com/c0fec0de/anytree/releases/tag/${version}"; license = licenses.asl20; - maintainers = [ ]; + maintainers = with maitnainers; [ ]; }; }