at master 1.5 kB view raw
1{ 2 pkgs, 3 lib, 4 buildPythonPackage, 5 fetchFromGitHub, 6 setuptools, 7 jupyterlab, 8 nbexec, 9 pandas, 10 pandas-stubs, 11 pdfminer-six, 12 pillow, 13 pypdfium2, 14 pytest-cov-stub, 15 pytest-parallel, 16 pytestCheckHook, 17 types-pillow, 18 writableTmpDirAsHomeHook, 19}: 20 21buildPythonPackage rec { 22 pname = "pdfplumber"; 23 version = "0.11.7"; 24 pyproject = true; 25 26 src = fetchFromGitHub { 27 owner = "jsvine"; 28 repo = "pdfplumber"; 29 tag = "v${version}"; 30 hash = "sha256-6oCHFf/lNQidP69l0lVcvIQ0ldO3djRDnxLwcZ+VDVk="; 31 }; 32 33 build-system = [ setuptools ]; 34 35 dependencies = [ 36 pdfminer-six 37 pillow 38 pypdfium2 39 ]; 40 41 nativeCheckInputs = [ 42 pkgs.ghostscript 43 jupyterlab 44 nbexec 45 pandas 46 pandas-stubs 47 pytest-cov-stub 48 pytest-parallel 49 pytestCheckHook 50 types-pillow 51 writableTmpDirAsHomeHook 52 ]; 53 54 pythonRelaxDeps = [ "pdfminer.six" ]; 55 56 disabledTestPaths = [ 57 # AssertionError 58 "tests/test_convert.py::Test::test_cli_csv" 59 "tests/test_convert.py::Test::test_cli_csv_exclude" 60 "tests/test_convert.py::Test::test_csv" 61 ]; 62 63 pythonImportsCheck = [ "pdfplumber" ]; 64 65 meta = { 66 description = "Plumb a PDF for detailed information about each char, rectangle, line, et cetera and easily extract text and tables"; 67 mainProgram = "pdfplumber"; 68 homepage = "https://github.com/jsvine/pdfplumber"; 69 changelog = "https://github.com/jsvine/pdfplumber/releases/tag/${src.tag}"; 70 license = lib.licenses.mit; 71 maintainers = with lib.maintainers; [ happysalada ]; 72 }; 73}