2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2023-03-15 16:39:30 +00:00
|
|
|
, flit-core
|
2022-08-12 12:06:08 +00:00
|
|
|
, pythonOlder
|
|
|
|
, typing-extensions
|
2022-09-09 14:08:57 +00:00
|
|
|
, unittestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2024-04-21 15:54:59 +00:00
|
|
|
pname = "pypdf2";
|
2023-03-15 16:39:30 +00:00
|
|
|
version = "3.0.1";
|
|
|
|
|
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
2024-04-21 15:54:59 +00:00
|
|
|
pname = "PyPDF2";
|
|
|
|
inherit version;
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-p0QI9pumJx9xuTUu9O0D3FOjGqQE0ptdMfU7/s/uFEA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
flit-core
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
propagatedBuildInputs = lib.optionals (pythonOlder "3.10") [
|
|
|
|
typing-extensions
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ unittestCheckHook ];
|
2022-09-09 14:08:57 +00:00
|
|
|
|
2022-09-22 12:36:57 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"PyPDF2"
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A Pure-Python library built as a PDF toolkit";
|
2022-10-30 15:09:59 +00:00
|
|
|
homepage = "https://pypdf2.readthedocs.io/";
|
2022-09-22 12:36:57 +00:00
|
|
|
changelog = "https://github.com/py-pdf/PyPDF2/raw/${version}/CHANGELOG.md";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ desiderius vrthra ];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|