2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
behave,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
lxml,
|
|
|
|
mock,
|
|
|
|
pyparsing,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
|
|
|
typing-extensions,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-docx";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "1.1.0";
|
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-01-13 08:15:51 +00:00
|
|
|
hash = "sha256-WCm3IhQc8at5rt8MNNn+mSSyl2RYTA8hZOsrAtzfF8k=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
lxml
|
|
|
|
typing-extensions
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
behave
|
|
|
|
mock
|
|
|
|
pyparsing
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
postCheck = ''
|
2020-09-25 04:45:31 +00:00
|
|
|
behave --format progress --stop --tags=-wip
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "docx" ];
|
2024-01-13 08:15:51 +00:00
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
disabledTests = [
|
|
|
|
# https://github.com/python-openxml/python-docx/issues/1302
|
|
|
|
"it_accepts_unicode_providing_there_is_no_encoding_declaration"
|
|
|
|
];
|
|
|
|
|
|
|
|
pytestFlagsArray = [
|
|
|
|
"-W"
|
|
|
|
"ignore::DeprecationWarning"
|
|
|
|
];
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Create and update Microsoft Word .docx files";
|
2024-01-13 08:15:51 +00:00
|
|
|
homepage = "https://python-docx.readthedocs.io/";
|
|
|
|
changelog = "https://github.com/python-openxml/python-docx/blob/v${version}/HISTORY.rst";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ alexchapman ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|