diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-09-01 11:51:02 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-09-01 11:51:02 +0000 |
commit | aa4353b499e6950b7333578f936455a628145c31 (patch) | |
tree | c6332cedece2327a18d08794755b3fc0f9f1905b /nixpkgs/pkgs/development/python-modules/anytree | |
parent | ac456d475f4e50818499b804359355c0f3b4bbf7 (diff) | |
parent | 52185f4d76c18d8348f963795dfed1de018e8dfe (diff) | |
download | nixlib-aa4353b499e6950b7333578f936455a628145c31.tar nixlib-aa4353b499e6950b7333578f936455a628145c31.tar.gz nixlib-aa4353b499e6950b7333578f936455a628145c31.tar.bz2 nixlib-aa4353b499e6950b7333578f936455a628145c31.tar.lz nixlib-aa4353b499e6950b7333578f936455a628145c31.tar.xz nixlib-aa4353b499e6950b7333578f936455a628145c31.tar.zst nixlib-aa4353b499e6950b7333578f936455a628145c31.zip |
Merge https://github.com/NixOS/nixpkgs
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/anytree')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/anytree/default.nix | 49 |
1 files changed, 29 insertions, 20 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/anytree/default.nix b/nixpkgs/pkgs/development/python-modules/anytree/default.nix index d49b22349639..a83d8748d477 100644 --- a/nixpkgs/pkgs/development/python-modules/anytree/default.nix +++ b/nixpkgs/pkgs/development/python-modules/anytree/default.nix @@ -1,24 +1,28 @@ { lib , buildPythonPackage -, fetchPypi +, fetchFromGitHub +, fontconfig +, graphviz +, poetry-core +, pytestCheckHook , pythonOlder -, substituteAll , six +, substituteAll , withGraphviz ? true -, graphviz -, fontconfig -# Tests -, pytestCheckHook -, nose }: buildPythonPackage rec { pname = "anytree"; - version = "2.8.0"; + version = "2.9.0"; + format = "pyproject"; + + disabled = pythonOlder "3.7"; - src = fetchPypi { - inherit pname version; - sha256 = "3f0f93f355a91bc3e6245319bf4c1d50e3416cc7a35cc1133c1ff38306bbccab"; + 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; [ ]; }; } |