emaryn 2025-06-09 06:20:06 +08:00
parent 2747c473cc
commit b6007ceed5

View file

@ -1,8 +1,9 @@
{
lib,
pkgs,
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
jupyterlab,
nbexec,
pandas,
@ -14,33 +15,29 @@
pytest-parallel,
pytestCheckHook,
types-pillow,
writableTmpDirAsHomeHook,
}:
buildPythonPackage rec {
pname = "pdfplumber";
version = "0.11.5";
format = "setuptools";
version = "0.11.6";
pyproject = true;
src = fetchFromGitHub {
owner = "jsvine";
repo = "pdfplumber";
tag = "v${version}";
hash = "sha256-oe6lZyQKXASzG7Ho6o7mlXY+BOgVBaACebxbYD+1+x0=";
hash = "sha256-ljoM252w0oOqTUgYT6jtAW+jElPU9a49K6Atwdv5Dvo=";
};
build-system = [ setuptools ];
dependencies = [
pdfminer-six
pillow
pypdfium2
];
preCheck = ''
export HOME=$(mktemp -d)
# test_issue_1089 assumes the soft limit on open files is "low", otherwise it never completes
# reported at: https://github.com/jsvine/pdfplumber/issues/1263
ulimit -n 1024
'';
nativeCheckInputs = [
pkgs.ghostscript
jupyterlab
@ -51,6 +48,16 @@ buildPythonPackage rec {
pytest-parallel
pytestCheckHook
types-pillow
writableTmpDirAsHomeHook
];
pythonRelaxDeps = [ "pdfminer.six" ];
disabledTestPaths = [
# AssertionError
"tests/test_convert.py::Test::test_cli_csv"
"tests/test_convert.py::Test::test_cli_csv_exclude"
"tests/test_convert.py::Test::test_csv"
];
pythonImportsCheck = [ "pdfplumber" ];