2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
lxml,
|
2024-09-19 14:19:46 +00:00
|
|
|
paragraphs,
|
|
|
|
setuptools,
|
|
|
|
setuptools-scm,
|
2024-06-05 15:53:02 +00:00
|
|
|
pytestCheckHook,
|
2024-09-19 14:19:46 +00:00
|
|
|
pythonOlder,
|
|
|
|
typing-extensions,
|
2023-10-19 13:55:26 +00:00
|
|
|
}:
|
2021-04-08 16:26:57 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "docx2python";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "3.0.0";
|
2023-10-19 13:55:26 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
2021-04-08 16:26:57 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ShayHill";
|
2023-10-19 13:55:26 +00:00
|
|
|
repo = "docx2python";
|
|
|
|
rev = "refs/tags/${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-ucLDdfmLAWcGunOKvh8tBQknXTPI1qOqyXgVGjQOGoQ=";
|
2021-04-08 16:26:57 +00:00
|
|
|
};
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
build-system = [
|
|
|
|
setuptools
|
|
|
|
setuptools-scm
|
|
|
|
];
|
2023-10-19 13:55:26 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
dependencies = [
|
|
|
|
lxml
|
|
|
|
paragraphs
|
|
|
|
typing-extensions
|
|
|
|
];
|
2023-10-19 13:55:26 +00:00
|
|
|
|
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
|
|
|
|
2021-04-08 16:26:57 +00:00
|
|
|
pythonImportsCheck = [ "docx2python" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Extract docx headers, footers, (formatted) text, footnotes, endnotes, properties, and images";
|
2024-09-19 14:19:46 +00:00
|
|
|
homepage = "https://github.com/ShayHill/docx2python";
|
2023-10-19 13:55:26 +00:00
|
|
|
changelog = "https://github.com/ShayHill/docx2python/blob/${src.rev}/CHANGELOG.md";
|
2021-04-08 16:26:57 +00:00
|
|
|
license = licenses.mit;
|
2024-09-19 14:19:46 +00:00
|
|
|
maintainers = [ ];
|
2021-04-08 16:26:57 +00:00
|
|
|
};
|
|
|
|
}
|