Merge pull request #165382 from austinbutler/ocrmypdf-pdfminer-fix

pdfminer: fix missing package version
This commit is contained in:
Ivv 2022-03-24 00:14:58 +01:00 committed by GitHub
commit ec87404e71
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 1 deletions

View file

@ -80,6 +80,12 @@ buildPythonPackage rec {
pytestCheckHook
];
postPatch = ''
# https://github.com/ocrmypdf/OCRmyPDF/issues/933
substituteInPlace setup.cfg \
--replace "pdfminer.six!=20200720,>=20191110,<=20211012" "pdfminer.six!=20200720,>=20191110,<=20220319"
'';
pythonImportsCheck = [
"ocrmypdf"
];

View file

@ -21,6 +21,12 @@ buildPythonPackage rec {
done
'';
postPatch = ''
# Verion 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}
'';
checkInputs = [ pytestCheckHook ];
meta = with lib; {

View file

@ -13,7 +13,8 @@ buildPythonPackage rec {
postPatch = ''
substituteInPlace requirements.txt \
--replace "chardet==4.0.0" "chardet"
--replace "chardet==4.0.0" "chardet" \
--replace "pdfminer.six==20201018" "pdfminer.six"
'';
propagatedBuildInputs = [ pdfminer chardet ];

View file

@ -131,6 +131,7 @@ buildPythonPackage rec {
postPatch = ''
substituteInPlace setup.cfg \
--replace "pdfminer.six >= 20200101" "pdfminer.six" \
--replace "pluggy >= 0.12.0, < 1.0" "pluggy" \
--replace "pygmars >= 0.7.0" "pygmars" \
--replace "license_expression >= 21.6.14" "license_expression"