depot/third_party/nixpkgs/pkgs/development/python-modules/pypdf2/default.nix
Default email b41113241d Project import generated by Copybara.
GitOrigin-RevId: ae1dc133ea5f1538d035af41e5ddbc2ebcb67b90
2022-09-22 14:36:57 +02:00

40 lines
851 B
Nix

{ lib
, buildPythonPackage
, fetchPypi
, pythonOlder
, glibcLocales
, typing-extensions
, unittestCheckHook
}:
buildPythonPackage rec {
pname = "PyPDF2";
version = "2.10.9";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-8tpSVPBU6O+BDFMf4Rr28KQ2or4VmF7g0oho2GmOWj8=";
};
LC_ALL = "en_US.UTF-8";
buildInputs = [ glibcLocales ];
propagatedBuildInputs = lib.optionals (pythonOlder "3.10") [
typing-extensions
];
checkInputs = [ unittestCheckHook ];
pythonImportsCheck = [
"PyPDF2"
];
meta = with lib; {
description = "A Pure-Python library built as a PDF toolkit";
homepage = "https://github.com/py-pdf/PyPDF2";
changelog = "https://github.com/py-pdf/PyPDF2/raw/${version}/CHANGELOG.md";
license = licenses.bsd3;
maintainers = with maintainers; [ desiderius vrthra ];
};
}