Merge pull request #277440 from marsam/update-pdfminer-six

python311Packages.pdfminer-six: 20221105 -> 20231228
This commit is contained in:
OTABI Tomoya 2023-12-30 17:59:09 +09:00 committed by GitHub
commit 5380a2412f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 35 additions and 10 deletions

View File

@ -1,19 +1,22 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, importlib-metadata
, isPy3k
, cryptography
, charset-normalizer
, pythonOlder
, typing-extensions
, pytestCheckHook
, setuptools
, substituteAll
, ocrmypdf
}:
buildPythonPackage rec {
pname = "pdfminer-six";
version = "20221105";
format = "setuptools";
version = "20231228";
pyproject = true;
disabled = !isPy3k;
@ -21,13 +24,27 @@ buildPythonPackage rec {
owner = "pdfminer";
repo = "pdfminer.six";
rev = version;
hash = "sha256-OyEeQBuYfj4iEcRt2/daSaUfTOjCVSCyHW2qffal+Bk=";
hash = "sha256-LXPECQQojD3IY9zRkrDBufy4A8XUuYiRpryqUx/I3qo=";
};
patches = [
(substituteAll {
src = ./disable-setuptools-git-versioning.patch;
inherit version;
})
];
nativeBuildInputs = [
setuptools
];
propagatedBuildInputs = [
charset-normalizer
cryptography
] ++ lib.optionals (pythonOlder "3.8") [ typing-extensions ];
] ++ lib.optionals (pythonOlder "3.8") [
importlib-metadata
typing-extensions
];
postInstall = ''
for file in $out/bin/*.py; do
@ -35,12 +52,6 @@ buildPythonPackage rec {
done
'';
postPatch = ''
# Version is not stored in repo, gets added by a GitHub action after tag is created
# https://github.com/pdfminer/pdfminer.six/pull/727
substituteInPlace pdfminer/__init__.py --replace "__VERSION__" ${version}
'';
pythonImportsCheck = [
"pdfminer"
"pdfminer.high_level"

View File

@ -0,0 +1,14 @@
--- a/setup.py
+++ b/setup.py
@@ -7,10 +7,7 @@
setup(
name="pdfminer.six",
- setuptools_git_versioning={
- "enabled": True,
- },
- setup_requires=["setuptools-git-versioning<2"],
+ version="@version@",
packages=["pdfminer"],
package_data={"pdfminer": ["cmap/*.pickle.gz", "py.typed"]},
install_requires=[