1{ lib 2, buildPythonPackage 3, fetchPypi 4, pythonOlder 5, glibcLocales 6, typing-extensions 7, unittestCheckHook 8}: 9 10buildPythonPackage rec { 11 pname = "PyPDF2"; 12 version = "2.11.1"; 13 14 src = fetchPypi { 15 inherit pname version; 16 sha256 = "sha256-PHut1RLCFxHrF4nC6tv5YnkonA+URS7lSoZHO/vv1zI="; 17 }; 18 19 LC_ALL = "en_US.UTF-8"; 20 buildInputs = [ glibcLocales ]; 21 22 propagatedBuildInputs = lib.optionals (pythonOlder "3.10") [ 23 typing-extensions 24 ]; 25 26 checkInputs = [ unittestCheckHook ]; 27 28 pythonImportsCheck = [ 29 "PyPDF2" 30 ]; 31 32 meta = with lib; { 33 description = "A Pure-Python library built as a PDF toolkit"; 34 homepage = "https://pypdf2.readthedocs.io/"; 35 changelog = "https://github.com/py-pdf/PyPDF2/raw/${version}/CHANGELOG.md"; 36 license = licenses.bsd3; 37 maintainers = with maintainers; [ desiderius vrthra ]; 38 }; 39 40}