mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
python313Packages.pdfminer-six: 20240706 -> 20250506 (#409226)
This commit is contained in:
commit
5682734cc3
3 changed files with 29 additions and 52 deletions
|
@ -2,53 +2,39 @@
|
|||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
fetchpatch2,
|
||||
cryptography,
|
||||
charset-normalizer,
|
||||
pythonOlder,
|
||||
pytestCheckHook,
|
||||
setuptools,
|
||||
replaceVars,
|
||||
setuptools-scm,
|
||||
ocrmypdf,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pdfminer-six";
|
||||
version = "20240706";
|
||||
version = "20250506";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "pdfminer";
|
||||
repo = "pdfminer.six";
|
||||
tag = version;
|
||||
hash = "sha256-aY7GQADRxeiclr6/G3RRgrPcl8rGiC85JYEIjIa+vG0=";
|
||||
hash = "sha256-BE/HMl/e1KnkSc2jXU5Du5FMF+rCBv5AJ7a88oFrBgM=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# https://github.com/pdfminer/pdfminer.six/pull/1027
|
||||
(fetchpatch2 {
|
||||
name = "fix-dereference-MediaBox.patch";
|
||||
url = "https://github.com/pdfminer/pdfminer.six/pull/1027/commits/ad101c152c71431a21bfa5a8dbe33b3ba385ceec.patch?full_index=1";
|
||||
excludes = [ "CHANGELOG.md" ];
|
||||
hash = "sha256-fsSXvN92MVtNFpAst0ctvGrbxVvoe4Nyz4wMZqJ1aw8=";
|
||||
})
|
||||
(replaceVars ./disable-setuptools-git-versioning.patch {
|
||||
inherit version;
|
||||
})
|
||||
build-system = [
|
||||
setuptools
|
||||
setuptools-scm
|
||||
];
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
dependencies = [
|
||||
charset-normalizer
|
||||
cryptography
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
for file in $out/bin/*.py; do
|
||||
ln $file ''${file//.py/}
|
||||
for file in "$out/bin/"*.py; do
|
||||
mv "$file" "''${file%.py}"
|
||||
done
|
||||
'';
|
||||
|
||||
|
@ -71,11 +57,11 @@ buildPythonPackage rec {
|
|||
};
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
changelog = "https://github.com/pdfminer/pdfminer.six/blob/${src.rev}/CHANGELOG.md";
|
||||
description = "PDF parser and analyzer";
|
||||
homepage = "https://github.com/pdfminer/pdfminer.six";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ psyanticy ];
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ psyanticy ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
diff --git a/setup.py b/setup.py
|
||||
index 42764e2..e7b93d3 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -19,10 +19,7 @@ if sys.version_info < (3, 12):
|
||||
|
||||
setup(
|
||||
name="pdfminer.six",
|
||||
- setuptools_git_versioning={
|
||||
- "enabled": True,
|
||||
- },
|
||||
- setup_requires=["setuptools-git-versioning<3"],
|
||||
+ version="@version@",
|
||||
packages=["pdfminer"],
|
||||
package_data={"pdfminer": ["cmap/*.pickle.gz", "py.typed"]},
|
||||
install_requires=[
|
|
@ -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" ];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue