From 612113bce4bb04d43ce89814b0ec1bdfa40f6ab2 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 20 Jan 2024 10:30:32 +0100 Subject: [PATCH 1/2] python311Packages.python-benedict: refactor --- .../python-modules/python-benedict/default.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/python-benedict/default.nix b/pkgs/development/python-modules/python-benedict/default.nix index 65a27c9b53cf..604edb59d038 100644 --- a/pkgs/development/python-modules/python-benedict/default.nix +++ b/pkgs/development/python-modules/python-benedict/default.nix @@ -16,6 +16,7 @@ , pythonRelaxDepsHook , pyyaml , requests +, setuptools , six , toml , xlrd @@ -25,19 +26,20 @@ buildPythonPackage rec { pname = "python-benedict"; version = "0.33.0"; - format = "setuptools"; + pyproject = true; disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "fabiocaccamo"; - repo = pname; + repo = "python-benedict"; rev = "refs/tags/${version}"; hash = "sha256-SJBU7jMnyLBdWQPQ/UGbVklKUOrCM3fMnOkXKHQnyPI="; }; nativeBuildInputs = [ pythonRelaxDepsHook + setuptools ]; pythonRelaxDeps = [ @@ -70,6 +72,8 @@ buildPythonPackage rec { disabledTests = [ # Tests require network access "test_from_base64_with_valid_url_valid_content" + "test_from_html_with_valid_file_valid_content" + "test_from_html_with_valid_url_valid_content" "test_from_json_with_valid_url_valid_content" "test_from_pickle_with_valid_url_valid_content" "test_from_plist_with_valid_url_valid_content" From b4fbd30eead6c2aab54fdce1aa734ad62bed71d6 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 20 Jan 2024 10:44:43 +0100 Subject: [PATCH 2/2] python311Packages.python-benedict: 0.33.0 -> 0.33.1 Changelog: https://github.com/fabiocaccamo/python-benedict/blob/0.33.1/CHANGELOG.md --- .../python-benedict/default.nix | 77 ++++++++++++++----- 1 file changed, 58 insertions(+), 19 deletions(-) diff --git a/pkgs/development/python-modules/python-benedict/default.nix b/pkgs/development/python-modules/python-benedict/default.nix index 604edb59d038..9b6ffe4e0fe8 100644 --- a/pkgs/development/python-modules/python-benedict/default.nix +++ b/pkgs/development/python-modules/python-benedict/default.nix @@ -7,6 +7,7 @@ , openpyxl , orjson , phonenumbers +, beautifulsoup4 , pytestCheckHook , python-dateutil , python-decouple @@ -17,7 +18,6 @@ , pyyaml , requests , setuptools -, six , toml , xlrd , xmltodict @@ -25,7 +25,7 @@ buildPythonPackage rec { pname = "python-benedict"; - version = "0.33.0"; + version = "0.33.1"; pyproject = true; disabled = pythonOlder "3.7"; @@ -34,40 +34,79 @@ buildPythonPackage rec { owner = "fabiocaccamo"; repo = "python-benedict"; rev = "refs/tags/${version}"; - hash = "sha256-SJBU7jMnyLBdWQPQ/UGbVklKUOrCM3fMnOkXKHQnyPI="; + hash = "sha256-QRWyMqHW4C3+718mgp9z/dQ1loesm0Vaf2TzW3yqF3A="; }; + pythonRelaxDeps = [ + "boto3" + ]; + nativeBuildInputs = [ pythonRelaxDepsHook setuptools ]; - pythonRelaxDeps = [ - "boto3" - ]; - propagatedBuildInputs = [ - boto3 - ftfy - mailchecker - openpyxl - phonenumbers - python-dateutil python-fsutil python-slugify - pyyaml requests - toml - xlrd - xmltodict ]; + passthru.optional-dependencies = { + all = [ + beautifulsoup4 + boto3 + ftfy + mailchecker + openpyxl + phonenumbers + python-dateutil + pyyaml + toml + xlrd + xmltodict + ]; + html = [ + beautifulsoup4 + xmltodict + ]; + io = [ + beautifulsoup4 + openpyxl + pyyaml + toml + xlrd + xmltodict + ]; + parse = [ + ftfy + mailchecker + phonenumbers + python-dateutil + ]; + s3 = [ + boto3 + ]; + toml = [ + toml + ]; + xls = [ + openpyxl + xlrd + ]; + xml = [ + xmltodict + ]; + yaml = [ + pyyaml + ]; + }; + nativeCheckInputs = [ orjson pytestCheckHook python-decouple - six - ]; + ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies); disabledTests = [ # Tests require network access