depot/third_party/nixpkgs/pkgs/development/python-modules/python-docx/default.nix
Default email c7cb07f092 Project import generated by Copybara.
GitOrigin-RevId: 1536926ef5621b09bba54035ae2bb6d806d72ac8
2024-02-29 21:09:43 +01:00

67 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 ];
};
}