pythonPackages.pdfx: 1.3.1 -> 1.4.1

This commit is contained in:
Robert Schütz 2021-04-13 11:47:30 +02:00
parent a73020b2a1
commit dd95a34b4e

View file

@ -1,28 +1,24 @@
{ lib, buildPythonPackage, fetchFromGitHub, pdfminer, chardet, pytest }:
{ lib, buildPythonPackage, fetchFromGitHub, pdfminer, chardet, pytestCheckHook }:
buildPythonPackage rec {
pname = "pdfx";
version = "1.3.1";
version = "1.4.1";
src = fetchFromGitHub {
owner = "metachris";
repo = "pdfx";
rev = "v${version}";
sha256 = "1183k4h5qdf8y0imbir9ja3yzzsvdmqgbv3bi6dnkgr1wy2xfr0v";
sha256 = "sha256-POpP6XwcqwvImrtIiDjpnHoNE0MKapuPjxojo+ocBK0=";
};
# Remove after https://github.com/metachris/pdfx/pull/28
prePatch = ''
sed -i -e "s|pdfminer2|pdfminer.six|" setup.py
postPatch = ''
substituteInPlace requirements.txt \
--replace "chardet==4.0.0" "chardet"
'';
propagatedBuildInputs = [ pdfminer chardet ];
checkInputs = [ pytest ];
checkPhase = ''
py.test
'';
checkInputs = [ pytestCheckHook ];
meta = with lib; {
inherit (src.meta) homepage;