about summary refs log tree commit diff
path: root/pkgs/development/python-modules/borb/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/borb/default.nix')
-rw-r--r--pkgs/development/python-modules/borb/default.nix70
1 files changed, 46 insertions, 24 deletions
diff --git a/pkgs/development/python-modules/borb/default.nix b/pkgs/development/python-modules/borb/default.nix
index e1d2211f2ab31..589eedcab9bfa 100644
--- a/pkgs/development/python-modules/borb/default.nix
+++ b/pkgs/development/python-modules/borb/default.nix
@@ -1,30 +1,38 @@
-{ lib
-, buildPythonPackage
-, cryptography
-, fetchPypi
-, fonttools
-, lxml
-, pillow
-, python-barcode
-, pythonOlder
-, qrcode
-, requests
-, setuptools
+{
+  lib,
+  buildPythonPackage,
+  cryptography,
+  fetchFromGitHub,
+  fonttools,
+  lxml,
+  matplotlib,
+  pandas,
+  pillow,
+  python-barcode,
+  pythonOlder,
+  qrcode,
+  pytestCheckHook,
+  requests,
+  setuptools,
 }:
 
 buildPythonPackage rec {
   pname = "borb";
-  version = "2.1.22";
-  format = "setuptools";
+  version = "2.1.25";
+  pyproject = true;
 
   disabled = pythonOlder "3.6";
 
-  src = fetchPypi {
-    inherit pname version;
-    hash = "sha256-T+uSq/KF3p4zJJhQeompJIJ6BWhYFK9Ko9w0sZFtFhE=";
+  src = fetchFromGitHub {
+    owner = "jorisschellekens";
+    repo = "borb";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-eVxpcYL3ZgwidkSt6tUav3Bkne4lo1QCshdUFqkA0wI=";
   };
 
-  propagatedBuildInputs = [
+  build-system = [ setuptools ];
+
+  dependencies = [
     cryptography
     fonttools
     lxml
@@ -35,17 +43,31 @@ buildPythonPackage rec {
     setuptools
   ];
 
-  pythonImportsCheck = [
-    "borb.pdf"
+  nativeCheckInputs = [
+    matplotlib
+    pandas
+    pytestCheckHook
   ];
 
-  doCheck = false;
+  pythonImportsCheck = [ "borb.pdf" ];
+
+  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; {
+  meta = {
     description = "Library for reading, creating and manipulating PDF files in Python";
     homepage = "https://borbpdf.com/";
     changelog = "https://github.com/jorisschellekens/borb/releases/tag/v${version}";
-    license = licenses.agpl3Only;
-    maintainers = with maintainers; [ ];
+    license = lib.licenses.agpl3Only;
+    maintainers = with lib.maintainers; [ getchoo ];
   };
 }