depot/third_party/nixpkgs/pkgs/development/python-modules/python-docx/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

64 lines
1.2 KiB
Nix

{
lib,
behave,
buildPythonPackage,
fetchPypi,
lxml,
mock,
pyparsing,
pytestCheckHook,
pythonOlder,
setuptools,
typing-extensions,
}:
buildPythonPackage rec {
pname = "python-docx";
version = "1.1.0";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-WCm3IhQc8at5rt8MNNn+mSSyl2RYTA8hZOsrAtzfF8k=";
};
nativeBuildInputs = [ setuptools ];
propagatedBuildInputs = [
lxml
typing-extensions
];
nativeCheckInputs = [
behave
mock
pyparsing
pytestCheckHook
];
postCheck = ''
behave --format progress --stop --tags=-wip
'';
pythonImportsCheck = [ "docx" ];
disabledTests = [
# https://github.com/python-openxml/python-docx/issues/1302
"it_accepts_unicode_providing_there_is_no_encoding_declaration"
];
pytestFlagsArray = [
"-W"
"ignore::DeprecationWarning"
];
meta = with lib; {
description = "Create and update Microsoft Word .docx files";
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 ];
};
}