Merge pull request #277440 from marsam/update-pdfminer-six
python311Packages.pdfminer-six: 20221105 -> 20231228
This commit is contained in:
commit
5380a2412f
@ -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"
|
||||
|
@ -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=[
|
Loading…
Reference in New Issue
Block a user