From ce99b60b7512758e729460c6bed9468e09f0c7b2 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 19 May 2024 04:30:34 +0000 Subject: [PATCH 1/3] python311Packages.borb: 2.1.22 -> 2.1.23 --- pkgs/development/python-modules/borb/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/borb/default.nix b/pkgs/development/python-modules/borb/default.nix index e1d2211f2ab3..bea6e9a3baf0 100644 --- a/pkgs/development/python-modules/borb/default.nix +++ b/pkgs/development/python-modules/borb/default.nix @@ -14,14 +14,14 @@ buildPythonPackage rec { pname = "borb"; - version = "2.1.22"; + version = "2.1.23"; format = "setuptools"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - hash = "sha256-T+uSq/KF3p4zJJhQeompJIJ6BWhYFK9Ko9w0sZFtFhE="; + hash = "sha256-TJicWMqorCgfJmpujuM7jlq/BExwsXkOaO+/Ox2gR2A="; }; propagatedBuildInputs = [ From b05ea761f67d0c40ec0791dbbddd7ef41b6ff9dd Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 19 May 2024 11:16:15 +0200 Subject: [PATCH 2/3] python312Packages.borb: refactor - enable tests --- .../python-modules/borb/default.nix | 39 +++++++++++++++---- 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/borb/default.nix b/pkgs/development/python-modules/borb/default.nix index bea6e9a3baf0..5d2d339fa4d1 100644 --- a/pkgs/development/python-modules/borb/default.nix +++ b/pkgs/development/python-modules/borb/default.nix @@ -1,13 +1,16 @@ { lib , buildPythonPackage , cryptography -, fetchPypi +, fetchFromGitHub , fonttools , lxml +, matplotlib +, pandas , pillow , python-barcode , pythonOlder , qrcode +, pytestCheckHook , requests , setuptools }: @@ -15,16 +18,22 @@ buildPythonPackage rec { pname = "borb"; version = "2.1.23"; - format = "setuptools"; + pyproject = true; disabled = pythonOlder "3.6"; - src = fetchPypi { - inherit pname version; - hash = "sha256-TJicWMqorCgfJmpujuM7jlq/BExwsXkOaO+/Ox2gR2A="; + src = fetchFromGitHub { + owner = "jorisschellekens"; + repo = "borb"; + rev = "refs/tags/v${version}"; + hash = "sha256-cpih7ijoT4dEdoFjh6qQcnzjWd2zusv4tNgPyrIghvg="; }; - propagatedBuildInputs = [ + build-system = [ + setuptools + ]; + + dependencies = [ cryptography fonttools lxml @@ -35,11 +44,27 @@ buildPythonPackage rec { setuptools ]; + nativeCheckInputs = [ + matplotlib + pandas + pytestCheckHook + ]; + pythonImportsCheck = [ "borb.pdf" ]; - doCheck = false; + disabledTests = [ + "test_code_files_are_small " + "test_image_has_pdfobject_methods" + ]; + + disabledTestPaths = [ + # Tests require network access + "tests/pdf/" + "tests/toolkit/" + "tests/license/" + ]; meta = with lib; { description = "Library for reading, creating and manipulating PDF files in Python"; From 2817556719a3f08a6686fccaf4609d8942ab7ec3 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 19 May 2024 11:16:47 +0200 Subject: [PATCH 3/3] python312Packages.borb: format with nixfmt --- .../python-modules/borb/default.nix | 39 +++++++++---------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/pkgs/development/python-modules/borb/default.nix b/pkgs/development/python-modules/borb/default.nix index 5d2d339fa4d1..3639e72e4d05 100644 --- a/pkgs/development/python-modules/borb/default.nix +++ b/pkgs/development/python-modules/borb/default.nix @@ -1,18 +1,19 @@ -{ lib -, buildPythonPackage -, cryptography -, fetchFromGitHub -, fonttools -, lxml -, matplotlib -, pandas -, pillow -, python-barcode -, pythonOlder -, qrcode -, pytestCheckHook -, requests -, setuptools +{ + lib, + buildPythonPackage, + cryptography, + fetchFromGitHub, + fonttools, + lxml, + matplotlib, + pandas, + pillow, + python-barcode, + pythonOlder, + qrcode, + pytestCheckHook, + requests, + setuptools, }: buildPythonPackage rec { @@ -29,9 +30,7 @@ buildPythonPackage rec { hash = "sha256-cpih7ijoT4dEdoFjh6qQcnzjWd2zusv4tNgPyrIghvg="; }; - build-system = [ - setuptools - ]; + build-system = [ setuptools ]; dependencies = [ cryptography @@ -50,9 +49,7 @@ buildPythonPackage rec { pytestCheckHook ]; - pythonImportsCheck = [ - "borb.pdf" - ]; + pythonImportsCheck = [ "borb.pdf" ]; disabledTests = [ "test_code_files_are_small "